modal 0.76.0__py3-none-any.whl → 0.76.1__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/client.pyi CHANGED
@@ -27,7 +27,7 @@ class _Client:
27
27
  _snapshotted: bool
28
28
 
29
29
  def __init__(
30
- self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.76.0"
30
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.76.1"
31
31
  ): ...
32
32
  def is_closed(self) -> bool: ...
33
33
  @property
@@ -86,7 +86,7 @@ class Client:
86
86
  _snapshotted: bool
87
87
 
88
88
  def __init__(
89
- self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.76.0"
89
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.76.1"
90
90
  ): ...
91
91
  def is_closed(self) -> bool: ...
92
92
  @property
modal/dict.py CHANGED
@@ -39,8 +39,8 @@ class _Dict(_Object, type_prefix="di"):
39
39
  Dict entries are written to durable storage.
40
40
 
41
41
  Legacy Dicts (created before 2025-05-20) will still have entries expire 30 days after being
42
- last added. Additionally, data are stored in memory on the Modal server and could be lost due to
43
- unexpected server restarts. Eventually, these Dicts will be fully sunset.
42
+ last added. Additionally, contents are stored in memory on the Modal server and could be lost
43
+ due to unexpected server restarts. Eventually, these Dicts will be fully sunset.
44
44
 
45
45
  **Usage**
46
46
 
@@ -80,7 +80,7 @@ class _Dict(_Object, type_prefix="di"):
80
80
  environment_name: Optional[str] = None,
81
81
  _heartbeat_sleep: float = EPHEMERAL_OBJECT_HEARTBEAT_SLEEP,
82
82
  ) -> AsyncIterator["_Dict"]:
83
- """Creates a new ephemeral dict within a context manager:
83
+ """Creates a new ephemeral Dict within a context manager:
84
84
 
85
85
  Usage:
86
86
  ```python
@@ -238,7 +238,10 @@ class _Dict(_Object, type_prefix="di"):
238
238
 
239
239
  @live_method
240
240
  async def len(self) -> int:
241
- """Return the length of the dictionary, including any expired keys."""
241
+ """Return the length of the Dict.
242
+
243
+ Note: This is an expensive operation and will return at most 100,000.
244
+ """
242
245
  req = api_pb2.DictLenRequest(dict_id=self.object_id)
243
246
  resp = await retry_transient_errors(self._client.stub.DictLen, req)
244
247
  return resp.len
@@ -258,7 +261,7 @@ class _Dict(_Object, type_prefix="di"):
258
261
 
259
262
  @live_method
260
263
  async def update(self, other: Optional[Mapping] = None, /, **kwargs) -> None:
261
- """Update the dictionary with additional items."""
264
+ """Update the Dict with additional items."""
262
265
  # Support the Python dict.update API
263
266
  # https://docs.python.org/3/library/stdtypes.html#dict.update
264
267
  contents = {}
@@ -278,7 +281,7 @@ class _Dict(_Object, type_prefix="di"):
278
281
 
279
282
  @live_method
280
283
  async def put(self, key: Any, value: Any, *, skip_if_exists: bool = False) -> bool:
281
- """Add a specific key-value pair to the dictionary.
284
+ """Add a specific key-value pair to the Dict.
282
285
 
283
286
  Returns True if the key-value pair was added and False if it wasn't because the key already existed and
284
287
  `skip_if_exists` was set.
@@ -297,7 +300,7 @@ class _Dict(_Object, type_prefix="di"):
297
300
 
298
301
  @live_method
299
302
  async def __setitem__(self, key: Any, value: Any) -> None:
300
- """Set a specific key-value pair to the dictionary.
303
+ """Set a specific key-value pair to the Dict.
301
304
 
302
305
  Note: this function will block the event loop when called in an async context.
303
306
  """
@@ -305,7 +308,7 @@ class _Dict(_Object, type_prefix="di"):
305
308
 
306
309
  @live_method
307
310
  async def pop(self, key: Any) -> Any:
308
- """Remove a key from the dictionary, returning the value if it exists."""
311
+ """Remove a key from the Dict, returning the value if it exists."""
309
312
  req = api_pb2.DictPopRequest(dict_id=self.object_id, key=serialize(key))
310
313
  resp = await retry_transient_errors(self._client.stub.DictPop, req)
311
314
  if not resp.found:
@@ -314,7 +317,7 @@ class _Dict(_Object, type_prefix="di"):
314
317
 
315
318
  @live_method
316
319
  async def __delitem__(self, key: Any) -> Any:
317
- """Delete a key from the dictionary.
320
+ """Delete a key from the Dict.
318
321
 
319
322
  Note: this function will block the event loop when called in an async context.
320
323
  """
@@ -330,7 +333,7 @@ class _Dict(_Object, type_prefix="di"):
330
333
 
331
334
  @live_method_gen
332
335
  async def keys(self) -> AsyncIterator[Any]:
333
- """Return an iterator over the keys in this dictionary.
336
+ """Return an iterator over the keys in this Dict.
334
337
 
335
338
  Note that (unlike with Python dicts) the return value is a simple iterator,
336
339
  and results are unordered.
@@ -341,7 +344,7 @@ class _Dict(_Object, type_prefix="di"):
341
344
 
342
345
  @live_method_gen
343
346
  async def values(self) -> AsyncIterator[Any]:
344
- """Return an iterator over the values in this dictionary.
347
+ """Return an iterator over the values in this Dict.
345
348
 
346
349
  Note that (unlike with Python dicts) the return value is a simple iterator,
347
350
  and results are unordered.
@@ -352,7 +355,7 @@ class _Dict(_Object, type_prefix="di"):
352
355
 
353
356
  @live_method_gen
354
357
  async def items(self) -> AsyncIterator[tuple[Any, Any]]:
355
- """Return an iterator over the (key, value) tuples in this dictionary.
358
+ """Return an iterator over the (key, value) tuples in this Dict.
356
359
 
357
360
  Note that (unlike with Python dicts) the return value is a simple iterator,
358
361
  and results are unordered.
modal/functions.pyi CHANGED
@@ -234,11 +234,11 @@ class Function(
234
234
 
235
235
  _call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
236
236
 
237
- class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
237
+ class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
238
238
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
239
239
  async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
240
240
 
241
- remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
241
+ remote: __remote_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
242
242
 
243
243
  class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
244
244
  def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
@@ -253,12 +253,12 @@ class Function(
253
253
  self, *args: modal._functions.P.args, **kwargs: modal._functions.P.kwargs
254
254
  ) -> modal._functions.OriginalReturnType: ...
255
255
 
256
- class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
256
+ class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
257
257
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
258
258
  async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
259
259
 
260
260
  _experimental_spawn: ___experimental_spawn_spec[
261
- modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
261
+ modal._functions.ReturnType, modal._functions.P, typing_extensions.Self
262
262
  ]
263
263
 
264
264
  class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER, SUPERSELF]):
@@ -267,11 +267,11 @@ class Function(
267
267
 
268
268
  _spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P, typing_extensions.Self]
269
269
 
270
- class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
270
+ class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
271
271
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
272
272
  async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
273
273
 
274
- spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
274
+ spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
275
275
 
276
276
  def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
277
277
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 0.76.0
3
+ Version: 0.76.1
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=xojuGZv4LaQwZU5ntj7WbmMjeNuB9Gll8Mzqe2LyiEs,51323
22
22
  modal/app.pyi,sha256=zNwR1_2LpmQc9AhemuAeVdk90XNYDw9keOkXAwAATeA,28732
23
23
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
24
24
  modal/client.py,sha256=o-aQThHpvDHUzg_kUafyhWzACViUBhY2WLZ2EitnSHA,16787
25
- modal/client.pyi,sha256=F8vKCSiXZoUO5CYO342bpOzML_gF9IYqXU8GhMyGKLM,8383
25
+ modal/client.pyi,sha256=fDbza0LU8bf2905yGWl1rFkR84U8LXrNEpi03BAieTg,8383
26
26
  modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
27
27
  modal/cloud_bucket_mount.pyi,sha256=30T3K1a89l6wzmEJ_J9iWv9SknoGqaZDx59Xs-ZQcmk,1607
28
28
  modal/cls.py,sha256=LZMQdFZ06LpbLDbsCJknniU-393Jb44E1lqveLVM8F8,38365
@@ -30,7 +30,7 @@ modal/cls.pyi,sha256=BmFCoiFS4EQjkx36iybAFNpxu6xaq24lyJpQuCsB-ko,12990
30
30
  modal/config.py,sha256=OOMEJ5LHNFbHRW5wUpuhl0TH6EPW8D1XV9I3OJXrZrk,12668
31
31
  modal/container_process.py,sha256=vvyK3DVPUMsuqvkKdUiQ49cDLF9JawGrxpglLk5vfgI,6208
32
32
  modal/container_process.pyi,sha256=cR4aRHTbcVvmxGCc1_k2Ey8JllJIAQYq9PBKx0_1TuI,2916
33
- modal/dict.py,sha256=wOifmVwJS-X6FS0JcvJCfL9mrny6zWxk3EHmp-2MDpU,14481
33
+ modal/dict.py,sha256=SSf8zjaj33tX11gM3dEGEeLaHmd6txTzujR4noeKag4,14491
34
34
  modal/dict.pyi,sha256=RBaQyOd1ABRNN7vIf5L_rv94y7Kq5Qn9IlKHSr4j8N0,8120
35
35
  modal/environments.py,sha256=t_TdUyORfIjlEAOS7I4My1qHi0cVsjPxwKloLmAAZMc,6935
36
36
  modal/environments.pyi,sha256=4HbI0kywveaUVI7HqDtZ4HphCTGXYi_wie2hz87up5A,3425
@@ -39,7 +39,7 @@ modal/file_io.py,sha256=lcMs_E9Xfm0YX1t9U2wNIBPnqHRxmImqjLW1GHqVmyg,20945
39
39
  modal/file_io.pyi,sha256=oB7x-rKq7bmm8cA7Z7W9C9yeko7KK9m9i5GidFnkGK4,9569
40
40
  modal/file_pattern_matcher.py,sha256=wov-otB5M1oTdrYDtR2_VgacYin2srdtAP4McA1Cqzw,6516
41
41
  modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
42
- modal/functions.pyi,sha256=xc6igwNS77kYkyuVpWOlMPkanxriesIaKFTYlvmuXp0,16993
42
+ modal/functions.pyi,sha256=3kHFXeXV0YYg0w1hmBqSV4k7djmjU9qfrmUyURlp8lE,16993
43
43
  modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
44
44
  modal/image.py,sha256=lg3XxIWNYV8je88oEPbihzSEq_9gumc0NLbzZLAhm74,92807
45
45
  modal/image.pyi,sha256=MDq7tNJevElK78VxFYrZRe_00kz9gPdg98MN5c6fFoE,25644
@@ -146,7 +146,7 @@ modal/requirements/2024.10.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddR
146
146
  modal/requirements/PREVIEW.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddRo,296
147
147
  modal/requirements/README.md,sha256=9tK76KP0Uph7O0M5oUgsSwEZDj5y-dcUPsnpR0Sc-Ik,854
148
148
  modal/requirements/base-images.json,sha256=57vMSqzMbLBxw5tFWSaMiIkkVEps4JfX5PAtXGnkS4U,740
149
- modal-0.76.0.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
149
+ modal-0.76.1.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
150
150
  modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
151
151
  modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
152
152
  modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
@@ -171,9 +171,9 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
171
171
  modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
172
172
  modal_version/__init__.py,sha256=u-X2s_2GMkprLryPgSYm4nwqxeDjYDm_2mJ3SGySns4,470
173
173
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
174
- modal_version/_version_generated.py,sha256=luY94U3OY0dEDjZ9HnZ2LEvyaSY6Jm8G6CvyRe3GMcU,148
175
- modal-0.76.0.dist-info/METADATA,sha256=pBNdZGQNS6qMJVS1cRxzqyH0_PAHwyEUmAVF_9kQCoY,2450
176
- modal-0.76.0.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
177
- modal-0.76.0.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
178
- modal-0.76.0.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
179
- modal-0.76.0.dist-info/RECORD,,
174
+ modal_version/_version_generated.py,sha256=KyRkZQJinL4dASb3tOvgMurQhIltFnrNaw4Mt88xNBY,148
175
+ modal-0.76.1.dist-info/METADATA,sha256=p2wrEVo7s16sJYsnRZPAxHS68McqAI7ClciO9LVVHHc,2450
176
+ modal-0.76.1.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
177
+ modal-0.76.1.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
178
+ modal-0.76.1.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
179
+ modal-0.76.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2025
2
2
 
3
3
  # Note: Reset this value to -1 whenever you make a minor `0.X` release of the client.
4
- build_number = 0 # git: 1b997c3
4
+ build_number = 1 # git: 4dbc014
File without changes