modal 1.1.4.dev17__py3-none-any.whl → 1.1.4.dev18__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
modal/_functions.py CHANGED
@@ -1471,6 +1471,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
1471
1471
  self._info = None
1472
1472
  self._serve_mounts = frozenset()
1473
1473
  self._metadata = None
1474
+ self._experimental_flash_urls = None
1474
1475
 
1475
1476
  def _hydrate_metadata(self, metadata: Optional[Message]):
1476
1477
  # Overridden concrete implementation of base class method
@@ -1498,6 +1499,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
1498
1499
  self._max_object_size_bytes = (
1499
1500
  metadata.max_object_size_bytes if metadata.HasField("max_object_size_bytes") else MAX_OBJECT_SIZE_BYTES
1500
1501
  )
1502
+ self._experimental_flash_urls = metadata._experimental_flash_urls
1501
1503
 
1502
1504
  def _get_metadata(self):
1503
1505
  # Overridden concrete implementation of base class method
@@ -1515,6 +1517,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
1515
1517
  input_plane_url=self._input_plane_url,
1516
1518
  input_plane_region=self._input_plane_region,
1517
1519
  max_object_size_bytes=self._max_object_size_bytes,
1520
+ _experimental_flash_urls=self._experimental_flash_urls,
1518
1521
  )
1519
1522
 
1520
1523
  def _check_no_web_url(self, fn_name: str):
@@ -1545,6 +1548,11 @@ Use the `Function.get_web_url()` method instead.
1545
1548
  """URL of a Function running as a web endpoint."""
1546
1549
  return self._web_url
1547
1550
 
1551
+ @live_method
1552
+ async def _experimental_get_flash_urls(self) -> Optional[list[str]]:
1553
+ """URL of the flash service for the function."""
1554
+ return list(self._experimental_flash_urls) if self._experimental_flash_urls else None
1555
+
1548
1556
  @property
1549
1557
  async def is_generator(self) -> bool:
1550
1558
  """mdmd:hidden"""
modal/client.pyi CHANGED
@@ -33,7 +33,7 @@ class _Client:
33
33
  server_url: str,
34
34
  client_type: int,
35
35
  credentials: typing.Optional[tuple[str, str]],
36
- version: str = "1.1.4.dev17",
36
+ version: str = "1.1.4.dev18",
37
37
  ):
38
38
  """mdmd:hidden
39
39
  The Modal client object is not intended to be instantiated directly by users.
@@ -164,7 +164,7 @@ class Client:
164
164
  server_url: str,
165
165
  client_type: int,
166
166
  credentials: typing.Optional[tuple[str, str]],
167
- version: str = "1.1.4.dev17",
167
+ version: str = "1.1.4.dev18",
168
168
  ):
169
169
  """mdmd:hidden
170
170
  The Modal client object is not intended to be instantiated directly by users.
modal/cls.py CHANGED
@@ -12,7 +12,7 @@ from grpclib import GRPCError, Status
12
12
  from modal_proto import api_pb2
13
13
 
14
14
  from ._functions import _Function, _parse_retries
15
- from ._object import _Object
15
+ from ._object import _Object, live_method
16
16
  from ._partial_function import (
17
17
  _find_callables_for_obj,
18
18
  _find_partial_methods_for_user_cls,
@@ -510,6 +510,11 @@ class _Cls(_Object, type_prefix="cs"):
510
510
  # returns method names for a *local* class only for now (used by cli)
511
511
  return self._method_partials.keys()
512
512
 
513
+ @live_method
514
+ async def _experimental_get_flash_urls(self) -> Optional[list[str]]:
515
+ """URL of the flash service for the class."""
516
+ return await self._get_class_service_function()._experimental_get_flash_urls()
517
+
513
518
  def _hydrate_metadata(self, metadata: Message):
514
519
  assert isinstance(metadata, api_pb2.ClassHandleMetadata)
515
520
  class_service_function = self._get_class_service_function()
modal/cls.pyi CHANGED
@@ -354,6 +354,10 @@ class _Cls(modal._object._Object):
354
354
  def _get_name(self) -> str: ...
355
355
  def _get_class_service_function(self) -> modal._functions._Function: ...
356
356
  def _get_method_names(self) -> collections.abc.Collection[str]: ...
357
+ async def _experimental_get_flash_urls(self) -> typing.Optional[list[str]]:
358
+ """URL of the flash service for the class."""
359
+ ...
360
+
357
361
  def _hydrate_metadata(self, metadata: google.protobuf.message.Message): ...
358
362
  @staticmethod
359
363
  def validate_construction_mechanism(user_cls):
@@ -520,6 +524,18 @@ class Cls(modal.object.Object):
520
524
  def _get_name(self) -> str: ...
521
525
  def _get_class_service_function(self) -> modal.functions.Function: ...
522
526
  def _get_method_names(self) -> collections.abc.Collection[str]: ...
527
+
528
+ class ___experimental_get_flash_urls_spec(typing_extensions.Protocol[SUPERSELF]):
529
+ def __call__(self, /) -> typing.Optional[list[str]]:
530
+ """URL of the flash service for the class."""
531
+ ...
532
+
533
+ async def aio(self, /) -> typing.Optional[list[str]]:
534
+ """URL of the flash service for the class."""
535
+ ...
536
+
537
+ _experimental_get_flash_urls: ___experimental_get_flash_urls_spec[typing_extensions.Self]
538
+
523
539
  def _hydrate_metadata(self, metadata: google.protobuf.message.Message): ...
524
540
  @staticmethod
525
541
  def validate_construction_mechanism(user_cls):
modal/functions.pyi CHANGED
@@ -359,6 +359,17 @@ class Function(
359
359
 
360
360
  get_web_url: __get_web_url_spec[typing_extensions.Self]
361
361
 
362
+ class ___experimental_get_flash_urls_spec(typing_extensions.Protocol[SUPERSELF]):
363
+ def __call__(self, /) -> typing.Optional[list[str]]:
364
+ """URL of the flash service for the function."""
365
+ ...
366
+
367
+ async def aio(self, /) -> typing.Optional[list[str]]:
368
+ """URL of the flash service for the function."""
369
+ ...
370
+
371
+ _experimental_get_flash_urls: ___experimental_get_flash_urls_spec[typing_extensions.Self]
372
+
362
373
  @property
363
374
  def is_generator(self) -> bool:
364
375
  """mdmd:hidden"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.1.4.dev17
3
+ Version: 1.1.4.dev18
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -3,7 +3,7 @@ modal/__main__.py,sha256=45H-GtwzaDfN-1nP4_HYvzN3s7AG_HXR4-ynrsjO_OI,2803
3
3
  modal/_clustered_functions.py,sha256=Sy4Sf_17EO8OL-FUe8LYcm4hrqLyQFCssNhr3p0SroU,3013
4
4
  modal/_clustered_functions.pyi,sha256=JmYwAGOLEnD5AF-gYF9O5tu-SgGjeoJz-X1j48b1Ijg,1157
5
5
  modal/_container_entrypoint.py,sha256=a1HAQYh1gGpqHuhSw6AW7XDYHztbeYr5a8iNnfCnoks,29023
6
- modal/_functions.py,sha256=wDpUpxX_K5lLRQQ5wJWq2E4UjBo9uEvuv9QSqfboplo,88890
6
+ modal/_functions.py,sha256=HUqfkE_wxEmx30Fs3H3NIQc-fagweOc84-hkJ4pwY3Y,89319
7
7
  modal/_ipython.py,sha256=TW1fkVOmZL3YYqdS2YlM1hqpf654Yf8ZyybHdBnlhSw,301
8
8
  modal/_location.py,sha256=joiX-0ZeutEUDTrrqLF1GHXCdVLF-rHzstocbMcd_-k,366
9
9
  modal/_object.py,sha256=gwsLdXb-Ecd8nH8LVCo8oVZPzzdyo9BrN1DjgQmsSuM,11967
@@ -22,11 +22,11 @@ modal/app.py,sha256=hJU3DGzP5GwYRmBj57XajljkQtLxkKftxXih2TYRcKo,48047
22
22
  modal/app.pyi,sha256=0U2xVKD3yfHe5l2bcihTDjPl__tzOvx1AIYOTebu-5o,43375
23
23
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
24
24
  modal/client.py,sha256=kyAIVB3Ay-XKJizQ_1ufUFB__EagV0MLmHJpyYyJ7J0,18636
25
- modal/client.pyi,sha256=lxLNas06tmdopgkHnv71sy6XFQF5iYnRYkW7QoveobU,15831
25
+ modal/client.pyi,sha256=8i9HpTRSzXv3ZKa2ZT3xFmoJzyBslm8XJ3R5WrzSoTs,15831
26
26
  modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
27
27
  modal/cloud_bucket_mount.pyi,sha256=-qSfYAQvIoO_l2wsCCGTG5ZUwQieNKXdAO00yP1-LYU,7394
28
- modal/cls.py,sha256=1mBcExFrLDTZwkD3Dzu8F26_CL0CGktOV9pE60Y8g_E,40689
29
- modal/cls.pyi,sha256=TevKBrBez2R0_4Epsx5GB5gyQX_kQV-uVHPxpqEokhQ,28357
28
+ modal/cls.py,sha256=pTEO7pHjlO7taMbIqs4oI9ZZgKDJpVKyGkO5ZT0w6tQ,40934
29
+ modal/cls.pyi,sha256=C1eK-AkN-QaeXu0qmMZVgJmkb1tYAFS43iEG37takDs,28959
30
30
  modal/config.py,sha256=tW-SEGjVvAt3D_MNi3LhxXnFKIA9fjLd3UIgbW8uSJE,12121
31
31
  modal/container_process.py,sha256=XkPwNIW-iD_GB9u9yqv9q8y-i5cQ8eBbLZZ_GvEw9t8,6858
32
32
  modal/container_process.pyi,sha256=9m-st3hCUlNN1GOTctfPPvIvoLtEl7FbuGWwif5-7YU,6037
@@ -39,7 +39,7 @@ modal/file_io.py,sha256=OSKr77TujcXGJW1iikzYiHckLSmv07QBgBHcxxYEkoI,21456
39
39
  modal/file_io.pyi,sha256=xtO6Glf_BFwDE7QiQQo24QqcMf_Vv-iz7WojcGVlLBU,15932
40
40
  modal/file_pattern_matcher.py,sha256=A_Kdkej6q7YQyhM_2-BvpFmPqJ0oHb54B6yf9VqvPVE,8116
41
41
  modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
42
- modal/functions.pyi,sha256=h1oPAvbErW_i1Glzf_HsQenG-uH4KZk7X6razFbif6M,38890
42
+ modal/functions.pyi,sha256=U8T37vGtsCAbQfUYNz0hOK1vtYqn1si24-scdVQyaGo,39350
43
43
  modal/gpu.py,sha256=Fe5ORvVPDIstSq1xjmM6OoNgLYFWvogP9r5BgmD3hYg,6769
44
44
  modal/image.py,sha256=nXN9k_6gApHFy8-Bk_XT2Zu3jsDsGVrC3QcuiDC4yRY,103543
45
45
  modal/image.pyi,sha256=vKdb5PpYM8wcpq9PQegeVMjrPLzAipuV4q994NZiL84,69325
@@ -153,7 +153,7 @@ modal/experimental/__init__.py,sha256=dPBPpxsmjZMLF3YjRrXoTvT01pl65wxi4UdFZsOem3
153
153
  modal/experimental/flash.py,sha256=gydlThBSPgS8HA53Lwi0gUAFVtpdXu20IYAQXJSoTP0,21092
154
154
  modal/experimental/flash.pyi,sha256=A8_qJGtGoXEzKDdHbvhmCw7oqfneFEvJQK3ZdTOvUdU,10830
155
155
  modal/experimental/ipython.py,sha256=TrCfmol9LGsRZMeDoeMPx3Hv3BFqQhYnmD_iH0pqdhk,2904
156
- modal-1.1.4.dev17.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
156
+ modal-1.1.4.dev18.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
157
157
  modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
158
158
  modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
159
159
  modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
@@ -176,10 +176,10 @@ modal_proto/options_pb2.pyi,sha256=l7DBrbLO7q3Ir-XDkWsajm0d0TQqqrfuX54i4BMpdQg,1
176
176
  modal_proto/options_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
177
177
  modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0yJSI,247
178
178
  modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
179
- modal_version/__init__.py,sha256=N2wz9sFgRKKg4OHYFwU3AVZM3zIM6izEe5fPZoeS-LU,121
179
+ modal_version/__init__.py,sha256=FGQOnOuuawTZEWkrNaLUi3bo6ZecF2_6YH5C2vv2n58,121
180
180
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
181
- modal-1.1.4.dev17.dist-info/METADATA,sha256=otNiNfsuOjyFRzVqMRsj9VBaXbc62iXHds0Hoee0L_4,2460
182
- modal-1.1.4.dev17.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
183
- modal-1.1.4.dev17.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
184
- modal-1.1.4.dev17.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
185
- modal-1.1.4.dev17.dist-info/RECORD,,
181
+ modal-1.1.4.dev18.dist-info/METADATA,sha256=iS6Z8HG-4WOpYYsmMdzpF9vJH1jgPMKW81gBSeg_Xv0,2460
182
+ modal-1.1.4.dev18.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
183
+ modal-1.1.4.dev18.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
184
+ modal-1.1.4.dev18.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
185
+ modal-1.1.4.dev18.dist-info/RECORD,,
modal_version/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2025
2
2
  """Supplies the current version of the modal client library."""
3
3
 
4
- __version__ = "1.1.4.dev17"
4
+ __version__ = "1.1.4.dev18"