modal 1.1.4.dev3__py3-none-any.whl → 1.1.4.dev5__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
@@ -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.dev3",
36
+ version: str = "1.1.4.dev5",
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.dev3",
167
+ version: str = "1.1.4.dev5",
168
168
  ):
169
169
  """mdmd:hidden
170
170
  The Modal client object is not intended to be instantiated directly by users.
modal/sandbox.py CHANGED
@@ -109,6 +109,7 @@ class _Sandbox(_Object, type_prefix="sb"):
109
109
  secrets: Sequence[_Secret],
110
110
  name: Optional[str] = None,
111
111
  timeout: int = 300,
112
+ idle_timeout: Optional[int] = None,
112
113
  workdir: Optional[str] = None,
113
114
  gpu: GPU_T = None,
114
115
  cloud: Optional[str] = None,
@@ -213,6 +214,7 @@ class _Sandbox(_Object, type_prefix="sb"):
213
214
  mount_ids=[mount.object_id for mount in mounts] + [mount.object_id for mount in image._mount_layers],
214
215
  secret_ids=[secret.object_id for secret in secrets],
215
216
  timeout_secs=timeout,
217
+ idle_timeout_secs=idle_timeout,
216
218
  workdir=workdir,
217
219
  resources=convert_fn_config_to_resources_config(
218
220
  cpu=cpu, memory=memory, gpu=gpu, ephemeral_disk=ephemeral_disk
@@ -257,7 +259,9 @@ class _Sandbox(_Object, type_prefix="sb"):
257
259
  image: Optional[_Image] = None, # The image to run as the container for the sandbox.
258
260
  secrets: Sequence[_Secret] = (), # Environment variables to inject into the sandbox.
259
261
  network_file_systems: dict[Union[str, os.PathLike], _NetworkFileSystem] = {},
260
- timeout: int = 300, # Maximum execution time of the sandbox in seconds.
262
+ timeout: int = 300, # Maximum lifetime of the sandbox in seconds.
263
+ # The amount of time in seconds that a sandbox can be idle before being terminated.
264
+ idle_timeout: Optional[int] = None,
261
265
  workdir: Optional[str] = None, # Working directory of the sandbox.
262
266
  gpu: GPU_T = None,
263
267
  cloud: Optional[str] = None,
@@ -324,6 +328,7 @@ class _Sandbox(_Object, type_prefix="sb"):
324
328
  secrets=secrets,
325
329
  network_file_systems=network_file_systems,
326
330
  timeout=timeout,
331
+ idle_timeout=idle_timeout,
327
332
  workdir=workdir,
328
333
  gpu=gpu,
329
334
  cloud=cloud,
@@ -355,7 +360,9 @@ class _Sandbox(_Object, type_prefix="sb"):
355
360
  secrets: Sequence[_Secret] = (), # Environment variables to inject into the sandbox.
356
361
  mounts: Sequence[_Mount] = (),
357
362
  network_file_systems: dict[Union[str, os.PathLike], _NetworkFileSystem] = {},
358
- timeout: int = 300, # Maximum execution time of the sandbox in seconds.
363
+ timeout: int = 300, # Maximum lifetime of the sandbox in seconds.
364
+ # The amount of time in seconds that a sandbox can be idle before being terminated.
365
+ idle_timeout: Optional[int] = None,
359
366
  workdir: Optional[str] = None, # Working directory of the sandbox.
360
367
  gpu: GPU_T = None,
361
368
  cloud: Optional[str] = None,
@@ -405,6 +412,7 @@ class _Sandbox(_Object, type_prefix="sb"):
405
412
  secrets=secrets,
406
413
  name=name,
407
414
  timeout=timeout,
415
+ idle_timeout=idle_timeout,
408
416
  workdir=workdir,
409
417
  gpu=gpu,
410
418
  cloud=cloud,
@@ -479,7 +487,7 @@ class _Sandbox(_Object, type_prefix="sb"):
479
487
  environment_name: Optional[str] = None,
480
488
  client: Optional[_Client] = None,
481
489
  ) -> "_Sandbox":
482
- """Get a running Sandbox by name from the given app.
490
+ """Get a running Sandbox by name from a deployed App.
483
491
 
484
492
  Raises a modal.exception.NotFoundError if no running sandbox is found with the given name.
485
493
  A Sandbox's name is the `name` argument passed to `Sandbox.create`.
modal/sandbox.pyi CHANGED
@@ -60,6 +60,7 @@ class _Sandbox(modal._object._Object):
60
60
  secrets: collections.abc.Sequence[modal.secret._Secret],
61
61
  name: typing.Optional[str] = None,
62
62
  timeout: int = 300,
63
+ idle_timeout: typing.Optional[int] = None,
63
64
  workdir: typing.Optional[str] = None,
64
65
  gpu: typing.Union[None, str, modal.gpu._GPUConfig] = None,
65
66
  cloud: typing.Optional[str] = None,
@@ -96,6 +97,7 @@ class _Sandbox(modal._object._Object):
96
97
  secrets: collections.abc.Sequence[modal.secret._Secret] = (),
97
98
  network_file_systems: dict[typing.Union[str, os.PathLike], modal.network_file_system._NetworkFileSystem] = {},
98
99
  timeout: int = 300,
100
+ idle_timeout: typing.Optional[int] = None,
99
101
  workdir: typing.Optional[str] = None,
100
102
  gpu: typing.Union[None, str, modal.gpu._GPUConfig] = None,
101
103
  cloud: typing.Optional[str] = None,
@@ -145,6 +147,7 @@ class _Sandbox(modal._object._Object):
145
147
  mounts: collections.abc.Sequence[modal.mount._Mount] = (),
146
148
  network_file_systems: dict[typing.Union[str, os.PathLike], modal.network_file_system._NetworkFileSystem] = {},
147
149
  timeout: int = 300,
150
+ idle_timeout: typing.Optional[int] = None,
148
151
  workdir: typing.Optional[str] = None,
149
152
  gpu: typing.Union[None, str, modal.gpu._GPUConfig] = None,
150
153
  cloud: typing.Optional[str] = None,
@@ -177,7 +180,7 @@ class _Sandbox(modal._object._Object):
177
180
  environment_name: typing.Optional[str] = None,
178
181
  client: typing.Optional[modal.client._Client] = None,
179
182
  ) -> _Sandbox:
180
- """Get a running Sandbox by name from the given app.
183
+ """Get a running Sandbox by name from a deployed App.
181
184
 
182
185
  Raises a modal.exception.NotFoundError if no running sandbox is found with the given name.
183
186
  A Sandbox's name is the `name` argument passed to `Sandbox.create`.
@@ -370,6 +373,7 @@ class Sandbox(modal.object.Object):
370
373
  secrets: collections.abc.Sequence[modal.secret.Secret],
371
374
  name: typing.Optional[str] = None,
372
375
  timeout: int = 300,
376
+ idle_timeout: typing.Optional[int] = None,
373
377
  workdir: typing.Optional[str] = None,
374
378
  gpu: typing.Union[None, str, modal.gpu._GPUConfig] = None,
375
379
  cloud: typing.Optional[str] = None,
@@ -409,6 +413,7 @@ class Sandbox(modal.object.Object):
409
413
  typing.Union[str, os.PathLike], modal.network_file_system.NetworkFileSystem
410
414
  ] = {},
411
415
  timeout: int = 300,
416
+ idle_timeout: typing.Optional[int] = None,
412
417
  workdir: typing.Optional[str] = None,
413
418
  gpu: typing.Union[None, str, modal.gpu._GPUConfig] = None,
414
419
  cloud: typing.Optional[str] = None,
@@ -460,6 +465,7 @@ class Sandbox(modal.object.Object):
460
465
  typing.Union[str, os.PathLike], modal.network_file_system.NetworkFileSystem
461
466
  ] = {},
462
467
  timeout: int = 300,
468
+ idle_timeout: typing.Optional[int] = None,
463
469
  workdir: typing.Optional[str] = None,
464
470
  gpu: typing.Union[None, str, modal.gpu._GPUConfig] = None,
465
471
  cloud: typing.Optional[str] = None,
@@ -515,6 +521,7 @@ class Sandbox(modal.object.Object):
515
521
  typing.Union[str, os.PathLike], modal.network_file_system.NetworkFileSystem
516
522
  ] = {},
517
523
  timeout: int = 300,
524
+ idle_timeout: typing.Optional[int] = None,
518
525
  workdir: typing.Optional[str] = None,
519
526
  gpu: typing.Union[None, str, modal.gpu._GPUConfig] = None,
520
527
  cloud: typing.Optional[str] = None,
@@ -551,6 +558,7 @@ class Sandbox(modal.object.Object):
551
558
  typing.Union[str, os.PathLike], modal.network_file_system.NetworkFileSystem
552
559
  ] = {},
553
560
  timeout: int = 300,
561
+ idle_timeout: typing.Optional[int] = None,
554
562
  workdir: typing.Optional[str] = None,
555
563
  gpu: typing.Union[None, str, modal.gpu._GPUConfig] = None,
556
564
  cloud: typing.Optional[str] = None,
@@ -589,7 +597,7 @@ class Sandbox(modal.object.Object):
589
597
  environment_name: typing.Optional[str] = None,
590
598
  client: typing.Optional[modal.client.Client] = None,
591
599
  ) -> Sandbox:
592
- """Get a running Sandbox by name from the given app.
600
+ """Get a running Sandbox by name from a deployed App.
593
601
 
594
602
  Raises a modal.exception.NotFoundError if no running sandbox is found with the given name.
595
603
  A Sandbox's name is the `name` argument passed to `Sandbox.create`.
@@ -605,7 +613,7 @@ class Sandbox(modal.object.Object):
605
613
  environment_name: typing.Optional[str] = None,
606
614
  client: typing.Optional[modal.client.Client] = None,
607
615
  ) -> Sandbox:
608
- """Get a running Sandbox by name from the given app.
616
+ """Get a running Sandbox by name from a deployed App.
609
617
 
610
618
  Raises a modal.exception.NotFoundError if no running sandbox is found with the given name.
611
619
  A Sandbox's name is the `name` argument passed to `Sandbox.create`.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.1.4.dev3
3
+ Version: 1.1.4.dev5
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=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=Ln64Z9Juws1qyjrJZZaY36B3D3jj4-090H3v638G6vo,15829
25
+ modal/client.pyi,sha256=4k6zmBA-QDopAo46RbE2NtN2kIO1VW_tpw4br1e04OY,15829
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=1mBcExFrLDTZwkD3Dzu8F26_CL0CGktOV9pE60Y8g_E,40689
@@ -65,8 +65,8 @@ modal/retries.py,sha256=IvNLDM0f_GLUDD5VgEDoN09C88yoxSrCquinAuxT1Sc,5205
65
65
  modal/runner.py,sha256=ostdzYpQb-20tlD6dIq7bpWTkZkOhjJBNuMNektqnJA,24068
66
66
  modal/runner.pyi,sha256=lbwLljm1cC8d6PcNvmYQhkE8501V9fg0bYqqKX6G4r4,8489
67
67
  modal/running_app.py,sha256=v61mapYNV1-O-Uaho5EfJlryMLvIT9We0amUOSvSGx8,1188
68
- modal/sandbox.py,sha256=O_vB-VgJ2ZMw2yyT2-ATYIWHdeDXCPf4cFcc-3JSB5Q,40895
69
- modal/sandbox.pyi,sha256=HoHgwb167i83qiGhUE7UAy79l45wqfXKfOA9hZ5HiEo,41572
68
+ modal/sandbox.py,sha256=X-u9oQFbBWml8pAD1r6NMQBtybD4Npow0Bu5_sxT5-0,41326
69
+ modal/sandbox.pyi,sha256=wZGFhGzLcj7BRWzHWofjA5Z7NFrAkVxqgdjkVWK2pX8,41999
70
70
  modal/schedule.py,sha256=ng0g0AqNY5GQI9KhkXZQ5Wam5G42glbkqVQsNpBtbDE,3078
71
71
  modal/scheduler_placement.py,sha256=BAREdOY5HzHpzSBqt6jDVR6YC_jYfHMVqOzkyqQfngU,1235
72
72
  modal/secret.py,sha256=jcNJKc4ZB2nvAn7HJFawInqE-_7sbB43IWLZwyLBQ28,19308
@@ -153,7 +153,7 @@ modal/experimental/__init__.py,sha256=dPBPpxsmjZMLF3YjRrXoTvT01pl65wxi4UdFZsOem3
153
153
  modal/experimental/flash.py,sha256=viXQumCIFp5VFsPFURdFTBTjP_QnsAi8nSWXAMmfjeQ,19744
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.dev3.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
156
+ modal-1.1.4.dev5.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=V4bSYHQ5CN47ZDN6l1bj3o0Q0qozULCyBJemNbP7hPk,120
179
+ modal_version/__init__.py,sha256=C_-yAosPlJ2afk6cZQyiZdZN3Ly9GCWn2Vx8OXRFhi0,120
180
180
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
181
- modal-1.1.4.dev3.dist-info/METADATA,sha256=f3oP8kXcwYyCJxZ3ijlTtPBYyLOEUsLnKAP8RbEUlSk,2459
182
- modal-1.1.4.dev3.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
183
- modal-1.1.4.dev3.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
184
- modal-1.1.4.dev3.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
185
- modal-1.1.4.dev3.dist-info/RECORD,,
181
+ modal-1.1.4.dev5.dist-info/METADATA,sha256=do9x57RG-qhI1Q4LG1ap1e3iJwc44NqBVl8zQNmc-wo,2459
182
+ modal-1.1.4.dev5.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
183
+ modal-1.1.4.dev5.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
184
+ modal-1.1.4.dev5.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
185
+ modal-1.1.4.dev5.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.dev3"
4
+ __version__ = "1.1.4.dev5"