modal 1.1.5.dev29__py3-none-any.whl → 1.1.5.dev30__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.

Potentially problematic release.


This version of modal might be problematic. Click here for more details.

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.5.dev29",
36
+ version: str = "1.1.5.dev30",
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.5.dev29",
167
+ version: str = "1.1.5.dev30",
168
168
  ):
169
169
  """mdmd:hidden
170
170
  The Modal client object is not intended to be instantiated directly by users.
modal/functions.pyi CHANGED
@@ -449,7 +449,7 @@ class Function(
449
449
 
450
450
  _call_generator: ___call_generator_spec[typing_extensions.Self]
451
451
 
452
- class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
452
+ class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
453
453
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER:
454
454
  """Calls the function remotely, executing it with the given arguments and returning the execution's result."""
455
455
  ...
@@ -458,7 +458,7 @@ class Function(
458
458
  """Calls the function remotely, executing it with the given arguments and returning the execution's result."""
459
459
  ...
460
460
 
461
- remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
461
+ remote: __remote_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
462
462
 
463
463
  class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
464
464
  def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]:
@@ -485,7 +485,7 @@ class Function(
485
485
  """
486
486
  ...
487
487
 
488
- class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
488
+ class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
489
489
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
490
490
  """[Experimental] Calls the function with the given arguments, without waiting for the results.
491
491
 
@@ -509,7 +509,7 @@ class Function(
509
509
  ...
510
510
 
511
511
  _experimental_spawn: ___experimental_spawn_spec[
512
- modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
512
+ modal._functions.ReturnType, modal._functions.P, typing_extensions.Self
513
513
  ]
514
514
 
515
515
  class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER, SUPERSELF]):
@@ -518,7 +518,7 @@ class Function(
518
518
 
519
519
  _spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P, typing_extensions.Self]
520
520
 
521
- class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
521
+ class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
522
522
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
523
523
  """Calls the function with the given arguments, without waiting for the results.
524
524
 
@@ -539,7 +539,7 @@ class Function(
539
539
  """
540
540
  ...
541
541
 
542
- spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
542
+ spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
543
543
 
544
544
  def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]:
545
545
  """Return the inner Python object wrapped by this Modal Function."""
modal/sandbox.py CHANGED
@@ -562,7 +562,17 @@ class _Sandbox(_Object, type_prefix="sb"):
562
562
 
563
563
  return obj
564
564
 
565
- async def set_tags(self, tags: dict[str, str], *, client: Optional[_Client] = None):
565
+ async def get_tags(self) -> dict[str, str]:
566
+ """Fetches any tags (key-value pairs) currently attached to this Sandbox from the server."""
567
+ req = api_pb2.SandboxTagsGetRequest(sandbox_id=self.object_id)
568
+ try:
569
+ resp = await retry_transient_errors(self._client.stub.SandboxTagsGet, req)
570
+ except GRPCError as exc:
571
+ raise InvalidError(exc.message) if exc.status == Status.INVALID_ARGUMENT else exc
572
+
573
+ return {tag.tag_name: tag.tag_value for tag in resp.tags}
574
+
575
+ async def set_tags(self, tags: dict[str, str], *, client: Optional[_Client] = None) -> None:
566
576
  """Set tags (key-value pairs) on the Sandbox. Tags can be used to filter results in `Sandbox.list`."""
567
577
  environment_name = _get_environment_name()
568
578
  if client is None:
modal/sandbox.pyi CHANGED
@@ -241,7 +241,11 @@ class _Sandbox(modal._object._Object):
241
241
  """
242
242
  ...
243
243
 
244
- async def set_tags(self, tags: dict[str, str], *, client: typing.Optional[modal.client._Client] = None):
244
+ async def get_tags(self) -> dict[str, str]:
245
+ """Fetches any tags (key-value pairs) currently attached to this Sandbox from the server."""
246
+ ...
247
+
248
+ async def set_tags(self, tags: dict[str, str], *, client: typing.Optional[modal.client._Client] = None) -> None:
245
249
  """Set tags (key-value pairs) on the Sandbox. Tags can be used to filter results in `Sandbox.list`."""
246
250
  ...
247
251
 
@@ -744,12 +748,23 @@ class Sandbox(modal.object.Object):
744
748
 
745
749
  from_id: __from_id_spec
746
750
 
751
+ class __get_tags_spec(typing_extensions.Protocol[SUPERSELF]):
752
+ def __call__(self, /) -> dict[str, str]:
753
+ """Fetches any tags (key-value pairs) currently attached to this Sandbox from the server."""
754
+ ...
755
+
756
+ async def aio(self, /) -> dict[str, str]:
757
+ """Fetches any tags (key-value pairs) currently attached to this Sandbox from the server."""
758
+ ...
759
+
760
+ get_tags: __get_tags_spec[typing_extensions.Self]
761
+
747
762
  class __set_tags_spec(typing_extensions.Protocol[SUPERSELF]):
748
- def __call__(self, /, tags: dict[str, str], *, client: typing.Optional[modal.client.Client] = None):
763
+ def __call__(self, /, tags: dict[str, str], *, client: typing.Optional[modal.client.Client] = None) -> None:
749
764
  """Set tags (key-value pairs) on the Sandbox. Tags can be used to filter results in `Sandbox.list`."""
750
765
  ...
751
766
 
752
- async def aio(self, /, tags: dict[str, str], *, client: typing.Optional[modal.client.Client] = None):
767
+ async def aio(self, /, tags: dict[str, str], *, client: typing.Optional[modal.client.Client] = None) -> None:
753
768
  """Set tags (key-value pairs) on the Sandbox. Tags can be used to filter results in `Sandbox.list`."""
754
769
  ...
755
770
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.1.5.dev29
3
+ Version: 1.1.5.dev30
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -22,7 +22,7 @@ modal/app.py,sha256=OBFaL-8KVMtBMEmspHA76LvblPdnSgdoGioLkQBjhdQ,48851
22
22
  modal/app.pyi,sha256=Cqk3pOeEEroCLejj3yJ3XHDqt0rMzeSA295gMKEx6Ww,43955
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=nMDQqE9gzMvwyNrjwqPlPYRVF1cYq9kSCjIIbCKayU4,15831
25
+ modal/client.pyi,sha256=y8JnMYf7tOT7_XOh2AkKuveNNcctejua307Iq_wA3fU,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
28
  modal/cls.py,sha256=qb9h_ZKiz2q7fwKQ-5bdkz1x3tdu6sIm-UI09aQjPPc,41101
@@ -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=_xKitEUTNQStdZVtYBgWidtyHHsnjXUYgbirM0eMDyM,39558
42
+ modal/functions.pyi,sha256=AKLl2WxKWcC3vDfhCJ2sbkj-JUMWnRkOcNywjy_wsHs,39558
43
43
  modal/gpu.py,sha256=Fe5ORvVPDIstSq1xjmM6OoNgLYFWvogP9r5BgmD3hYg,6769
44
44
  modal/image.py,sha256=ioYIpKq4Fi1ojqdIyochyoRU1_Ncto_BSYLKzY88zuw,107883
45
45
  modal/image.pyi,sha256=ZNp48mVPzcQ6XNvxin1iO5XrZ89vfEZvU1Bi-V57jq0,76835
@@ -65,8 +65,8 @@ modal/retries.py,sha256=IvNLDM0f_GLUDD5VgEDoN09C88yoxSrCquinAuxT1Sc,5205
65
65
  modal/runner.py,sha256=Q9wGTeg6sYyusTgwXSinoIti4Gv5LsiadAvflgETBHc,24070
66
66
  modal/runner.pyi,sha256=lbwLljm1cC8d6PcNvmYQhkE8501V9fg0bYqqKX6G4r4,8489
67
67
  modal/running_app.py,sha256=v61mapYNV1-O-Uaho5EfJlryMLvIT9We0amUOSvSGx8,1188
68
- modal/sandbox.py,sha256=0UxFF-yCfD7SiQbAWCZT6f7lNk7wCY6A4p8lvwfImgk,45162
69
- modal/sandbox.pyi,sha256=pFVN-LZvRt3eMI_XFTJpPtBwxwoRc8CkytAYe4R_SU8,50009
68
+ modal/sandbox.py,sha256=mHlyW8eoV3hghtvBqgZHzANPVK-OrGU2pNSAB9ZqSqE,45685
69
+ modal/sandbox.pyi,sha256=QVUBtEEyZxYs7pMkX9E-Lwiq0qINeg9pMnfOSwW2VEM,50659
70
70
  modal/schedule.py,sha256=ng0g0AqNY5GQI9KhkXZQ5Wam5G42glbkqVQsNpBtbDE,3078
71
71
  modal/scheduler_placement.py,sha256=BAREdOY5HzHpzSBqt6jDVR6YC_jYfHMVqOzkyqQfngU,1235
72
72
  modal/secret.py,sha256=EifrHTx7QmU4DTU3QwedD7O4ma52hHL4Qku1dADjY0E,19305
@@ -153,7 +153,7 @@ modal/experimental/__init__.py,sha256=fCqzo_f3vcY750vHtd7CtLs5dvdM_C0ZLLGb3zXuK9
153
153
  modal/experimental/flash.py,sha256=7qRAL2Nrwbb60YKobcnpM0zJ8vw4xGJqabLPFgEzMZE,28295
154
154
  modal/experimental/flash.pyi,sha256=R9VV0UDotiY9BRUjacB-xI4qhR3yBymAvEZFRFHztLs,15143
155
155
  modal/experimental/ipython.py,sha256=TrCfmol9LGsRZMeDoeMPx3Hv3BFqQhYnmD_iH0pqdhk,2904
156
- modal-1.1.5.dev29.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
156
+ modal-1.1.5.dev30.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=5Qd27eq6ykkYFYD7N6xHtyCNfJv1-Pn1CeuuufpyW8E,121
179
+ modal_version/__init__.py,sha256=6re5BAVoYkuo-USuyHzjFDI-xw_9zw2jRG7Sgj9SdOc,121
180
180
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
181
- modal-1.1.5.dev29.dist-info/METADATA,sha256=aJXrPY4Ch9pJRMhBqpNd5V7DUhUoo7ga6MllyjnXm1k,2460
182
- modal-1.1.5.dev29.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
183
- modal-1.1.5.dev29.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
184
- modal-1.1.5.dev29.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
185
- modal-1.1.5.dev29.dist-info/RECORD,,
181
+ modal-1.1.5.dev30.dist-info/METADATA,sha256=vGOLYbWbhDj6ciB37yx_mmCDiba93VwgAH28WRYYfdA,2460
182
+ modal-1.1.5.dev30.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
183
+ modal-1.1.5.dev30.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
184
+ modal-1.1.5.dev30.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
185
+ modal-1.1.5.dev30.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.5.dev29"
4
+ __version__ = "1.1.5.dev30"