modal 1.0.6.dev50__py3-none-any.whl → 1.0.6.dev52__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 +2 -2
- modal/sandbox.py +11 -10
- modal/sandbox.pyi +3 -6
- {modal-1.0.6.dev50.dist-info → modal-1.0.6.dev52.dist-info}/METADATA +1 -1
- {modal-1.0.6.dev50.dist-info → modal-1.0.6.dev52.dist-info}/RECORD +13 -13
- modal_proto/api.proto +4 -1
- modal_proto/api_pb2.py +526 -526
- modal_proto/api_pb2.pyi +16 -3
- modal_version/__init__.py +1 -1
- {modal-1.0.6.dev50.dist-info → modal-1.0.6.dev52.dist-info}/WHEEL +0 -0
- {modal-1.0.6.dev50.dist-info → modal-1.0.6.dev52.dist-info}/entry_points.txt +0 -0
- {modal-1.0.6.dev50.dist-info → modal-1.0.6.dev52.dist-info}/licenses/LICENSE +0 -0
- {modal-1.0.6.dev50.dist-info → modal-1.0.6.dev52.dist-info}/top_level.txt +0 -0
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.0.6.
|
|
36
|
+
version: str = "1.0.6.dev52",
|
|
37
37
|
):
|
|
38
38
|
"""mdmd:hidden
|
|
39
39
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -163,7 +163,7 @@ class Client:
|
|
|
163
163
|
server_url: str,
|
|
164
164
|
client_type: int,
|
|
165
165
|
credentials: typing.Optional[tuple[str, str]],
|
|
166
|
-
version: str = "1.0.6.
|
|
166
|
+
version: str = "1.0.6.dev52",
|
|
167
167
|
):
|
|
168
168
|
"""mdmd:hidden
|
|
169
169
|
The Modal client object is not intended to be instantiated directly by users.
|
modal/sandbox.py
CHANGED
|
@@ -21,6 +21,7 @@ from ._object import _get_environment_name, _Object
|
|
|
21
21
|
from ._resolver import Resolver
|
|
22
22
|
from ._resources import convert_fn_config_to_resources_config
|
|
23
23
|
from ._utils.async_utils import TaskContext, synchronize_api
|
|
24
|
+
from ._utils.deprecation import deprecation_warning
|
|
24
25
|
from ._utils.grpc_utils import retry_transient_errors
|
|
25
26
|
from ._utils.mount_utils import validate_network_file_systems, validate_volumes
|
|
26
27
|
from .client import _Client
|
|
@@ -216,10 +217,7 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
216
217
|
verbose=verbose,
|
|
217
218
|
)
|
|
218
219
|
|
|
219
|
-
|
|
220
|
-
create_req = api_pb2.SandboxCreateRequest(
|
|
221
|
-
app_id=resolver.app_id, definition=definition, environment_name=resolver.environment_name
|
|
222
|
-
)
|
|
220
|
+
create_req = api_pb2.SandboxCreateRequest(app_id=resolver.app_id, definition=definition)
|
|
223
221
|
create_resp = await retry_transient_errors(resolver.client.stub.SandboxCreate, create_req)
|
|
224
222
|
|
|
225
223
|
sandbox_id = create_resp.sandbox_id
|
|
@@ -231,7 +229,6 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
231
229
|
async def create(
|
|
232
230
|
*entrypoint_args: str,
|
|
233
231
|
app: Optional["modal.app._App"] = None, # Optionally associate the sandbox with an app
|
|
234
|
-
environment_name: Optional[str] = None, # Optionally override the default environment
|
|
235
232
|
image: Optional[_Image] = None, # The image to run as the container for the sandbox.
|
|
236
233
|
secrets: Sequence[_Secret] = (), # Environment variables to inject into the sandbox.
|
|
237
234
|
network_file_systems: dict[Union[str, os.PathLike], _NetworkFileSystem] = {},
|
|
@@ -270,6 +267,7 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
270
267
|
SchedulerPlacement
|
|
271
268
|
] = None, # Experimental controls over fine-grained scheduling (alpha).
|
|
272
269
|
client: Optional[_Client] = None,
|
|
270
|
+
environment_name: Optional[str] = None, # *DEPRECATED* Optionally override the default environment
|
|
273
271
|
) -> "_Sandbox":
|
|
274
272
|
"""
|
|
275
273
|
Create a new Sandbox to run untrusted, arbitrary code. The Sandbox's corresponding container
|
|
@@ -284,10 +282,16 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
284
282
|
sandbox.wait()
|
|
285
283
|
```
|
|
286
284
|
"""
|
|
285
|
+
if environment_name is not None:
|
|
286
|
+
deprecation_warning(
|
|
287
|
+
(2025, 7, 16),
|
|
288
|
+
"Passing `environment_name` to `Sandbox.create` is deprecated and will be removed in a future release.",
|
|
289
|
+
"A sandbox's environment is determined by the app it is associated with.",
|
|
290
|
+
)
|
|
291
|
+
|
|
287
292
|
return await _Sandbox._create(
|
|
288
293
|
*entrypoint_args,
|
|
289
294
|
app=app,
|
|
290
|
-
environment_name=environment_name,
|
|
291
295
|
image=image,
|
|
292
296
|
secrets=secrets,
|
|
293
297
|
network_file_systems=network_file_systems,
|
|
@@ -316,7 +320,6 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
316
320
|
async def _create(
|
|
317
321
|
*entrypoint_args: str,
|
|
318
322
|
app: Optional["modal.app._App"] = None, # Optionally associate the sandbox with an app
|
|
319
|
-
environment_name: Optional[str] = None, # Optionally override the default environment
|
|
320
323
|
image: Optional[_Image] = None, # The image to run as the container for the sandbox.
|
|
321
324
|
secrets: Sequence[_Secret] = (), # Environment variables to inject into the sandbox.
|
|
322
325
|
mounts: Sequence[_Mount] = (),
|
|
@@ -361,8 +364,6 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
361
364
|
# sandbox that runs the shell session
|
|
362
365
|
from .app import _App
|
|
363
366
|
|
|
364
|
-
environment_name = _get_environment_name(environment_name)
|
|
365
|
-
|
|
366
367
|
_validate_exec_args(entrypoint_args)
|
|
367
368
|
|
|
368
369
|
# TODO(erikbern): Get rid of the `_new` method and create an already-hydrated object
|
|
@@ -422,7 +423,7 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
422
423
|
|
|
423
424
|
client = client or app_client or await _Client.from_env()
|
|
424
425
|
|
|
425
|
-
resolver = Resolver(client,
|
|
426
|
+
resolver = Resolver(client, app_id=app_id)
|
|
426
427
|
await resolver.load(obj)
|
|
427
428
|
return obj
|
|
428
429
|
|
modal/sandbox.pyi
CHANGED
|
@@ -78,7 +78,6 @@ class _Sandbox(modal._object._Object):
|
|
|
78
78
|
async def create(
|
|
79
79
|
*entrypoint_args: str,
|
|
80
80
|
app: typing.Optional[modal.app._App] = None,
|
|
81
|
-
environment_name: typing.Optional[str] = None,
|
|
82
81
|
image: typing.Optional[modal.image._Image] = None,
|
|
83
82
|
secrets: collections.abc.Sequence[modal.secret._Secret] = (),
|
|
84
83
|
network_file_systems: dict[typing.Union[str, os.PathLike], modal.network_file_system._NetworkFileSystem] = {},
|
|
@@ -104,6 +103,7 @@ class _Sandbox(modal._object._Object):
|
|
|
104
103
|
_experimental_enable_snapshot: bool = False,
|
|
105
104
|
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
|
106
105
|
client: typing.Optional[modal.client._Client] = None,
|
|
106
|
+
environment_name: typing.Optional[str] = None,
|
|
107
107
|
) -> _Sandbox:
|
|
108
108
|
"""Create a new Sandbox to run untrusted, arbitrary code. The Sandbox's corresponding container
|
|
109
109
|
will be created asynchronously.
|
|
@@ -123,7 +123,6 @@ class _Sandbox(modal._object._Object):
|
|
|
123
123
|
async def _create(
|
|
124
124
|
*entrypoint_args: str,
|
|
125
125
|
app: typing.Optional[modal.app._App] = None,
|
|
126
|
-
environment_name: typing.Optional[str] = None,
|
|
127
126
|
image: typing.Optional[modal.image._Image] = None,
|
|
128
127
|
secrets: collections.abc.Sequence[modal.secret._Secret] = (),
|
|
129
128
|
mounts: collections.abc.Sequence[modal.mount._Mount] = (),
|
|
@@ -362,7 +361,6 @@ class Sandbox(modal.object.Object):
|
|
|
362
361
|
/,
|
|
363
362
|
*entrypoint_args: str,
|
|
364
363
|
app: typing.Optional[modal.app.App] = None,
|
|
365
|
-
environment_name: typing.Optional[str] = None,
|
|
366
364
|
image: typing.Optional[modal.image.Image] = None,
|
|
367
365
|
secrets: collections.abc.Sequence[modal.secret.Secret] = (),
|
|
368
366
|
network_file_systems: dict[
|
|
@@ -390,6 +388,7 @@ class Sandbox(modal.object.Object):
|
|
|
390
388
|
_experimental_enable_snapshot: bool = False,
|
|
391
389
|
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
|
392
390
|
client: typing.Optional[modal.client.Client] = None,
|
|
391
|
+
environment_name: typing.Optional[str] = None,
|
|
393
392
|
) -> Sandbox:
|
|
394
393
|
"""Create a new Sandbox to run untrusted, arbitrary code. The Sandbox's corresponding container
|
|
395
394
|
will be created asynchronously.
|
|
@@ -410,7 +409,6 @@ class Sandbox(modal.object.Object):
|
|
|
410
409
|
/,
|
|
411
410
|
*entrypoint_args: str,
|
|
412
411
|
app: typing.Optional[modal.app.App] = None,
|
|
413
|
-
environment_name: typing.Optional[str] = None,
|
|
414
412
|
image: typing.Optional[modal.image.Image] = None,
|
|
415
413
|
secrets: collections.abc.Sequence[modal.secret.Secret] = (),
|
|
416
414
|
network_file_systems: dict[
|
|
@@ -438,6 +436,7 @@ class Sandbox(modal.object.Object):
|
|
|
438
436
|
_experimental_enable_snapshot: bool = False,
|
|
439
437
|
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
|
440
438
|
client: typing.Optional[modal.client.Client] = None,
|
|
439
|
+
environment_name: typing.Optional[str] = None,
|
|
441
440
|
) -> Sandbox:
|
|
442
441
|
"""Create a new Sandbox to run untrusted, arbitrary code. The Sandbox's corresponding container
|
|
443
442
|
will be created asynchronously.
|
|
@@ -461,7 +460,6 @@ class Sandbox(modal.object.Object):
|
|
|
461
460
|
/,
|
|
462
461
|
*entrypoint_args: str,
|
|
463
462
|
app: typing.Optional[modal.app.App] = None,
|
|
464
|
-
environment_name: typing.Optional[str] = None,
|
|
465
463
|
image: typing.Optional[modal.image.Image] = None,
|
|
466
464
|
secrets: collections.abc.Sequence[modal.secret.Secret] = (),
|
|
467
465
|
mounts: collections.abc.Sequence[modal.mount.Mount] = (),
|
|
@@ -496,7 +494,6 @@ class Sandbox(modal.object.Object):
|
|
|
496
494
|
/,
|
|
497
495
|
*entrypoint_args: str,
|
|
498
496
|
app: typing.Optional[modal.app.App] = None,
|
|
499
|
-
environment_name: typing.Optional[str] = None,
|
|
500
497
|
image: typing.Optional[modal.image.Image] = None,
|
|
501
498
|
secrets: collections.abc.Sequence[modal.secret.Secret] = (),
|
|
502
499
|
mounts: collections.abc.Sequence[modal.mount.Mount] = (),
|
|
@@ -22,7 +22,7 @@ modal/app.py,sha256=U0sPiHpphcRHLnoLYh2IrU2RSpRFX9BE5uHb7h42STs,47478
|
|
|
22
22
|
modal/app.pyi,sha256=cXiSTu2bwu6csAUdkOlh7mr9tPvtaS2qWSEhlC1UxAg,43787
|
|
23
23
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
|
24
24
|
modal/client.py,sha256=5QyM7VJjsFbHf6E91ar3A2KY9mx03wdtGlNJvfTKUVs,17087
|
|
25
|
-
modal/client.pyi,sha256=
|
|
25
|
+
modal/client.pyi,sha256=lmGPzV9ouW3RV7oT8CfmFuQdRbirKUv6ZEUDb4kEBNo,15270
|
|
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=B5EtzpBXemH718YvgXaYjuTKvairvqfXJ7IwLZ_6vVA,40034
|
|
@@ -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=
|
|
69
|
-
modal/sandbox.pyi,sha256=
|
|
68
|
+
modal/sandbox.py,sha256=77dRA1JTuohI4sONDMdpvDv8QGnQ-yd96baJmMyxEhg,37585
|
|
69
|
+
modal/sandbox.pyi,sha256=hOcdNZ3j5MlPaNZ4NAnoc31BQ1fZqQrEBWnD3m7ZxJg,38392
|
|
70
70
|
modal/schedule.py,sha256=ng0g0AqNY5GQI9KhkXZQ5Wam5G42glbkqVQsNpBtbDE,3078
|
|
71
71
|
modal/scheduler_placement.py,sha256=BAREdOY5HzHpzSBqt6jDVR6YC_jYfHMVqOzkyqQfngU,1235
|
|
72
72
|
modal/secret.py,sha256=bpgtv0urwaBOmmJpMTZIwVWUraQlpeu4hW8pbJiGcOA,10546
|
|
@@ -151,7 +151,7 @@ modal/requirements/2025.06.txt,sha256=KxDaVTOwatHvboDo4lorlgJ7-n-MfAwbPwxJ0zcJqr
|
|
|
151
151
|
modal/requirements/PREVIEW.txt,sha256=KxDaVTOwatHvboDo4lorlgJ7-n-MfAwbPwxJ0zcJqrs,312
|
|
152
152
|
modal/requirements/README.md,sha256=9tK76KP0Uph7O0M5oUgsSwEZDj5y-dcUPsnpR0Sc-Ik,854
|
|
153
153
|
modal/requirements/base-images.json,sha256=JYSDAgHTl-WrV_TZW5icY-IJEnbe2eQ4CZ_KN6EOZKU,1304
|
|
154
|
-
modal-1.0.6.
|
|
154
|
+
modal-1.0.6.dev52.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
|
155
155
|
modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
|
|
156
156
|
modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
|
|
157
157
|
modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
|
|
@@ -159,10 +159,10 @@ modal_docs/mdmd/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,2
|
|
|
159
159
|
modal_docs/mdmd/mdmd.py,sha256=eW5MzrEl7mSclDo4Uv64sQ1-4IyLggldbgUJdBVLDdI,6449
|
|
160
160
|
modal_docs/mdmd/signatures.py,sha256=XJaZrK7Mdepk5fdX51A8uENiLFNil85Ud0d4MH8H5f0,3218
|
|
161
161
|
modal_proto/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
|
162
|
-
modal_proto/api.proto,sha256=
|
|
162
|
+
modal_proto/api.proto,sha256=ZtaJsKz1QBSoLPFfQlm4wWfzA4nwfmLrBX5JUoJaGoI,99686
|
|
163
163
|
modal_proto/api_grpc.py,sha256=F7Hu-1Yg7p5a2SbKw9yR4AgpyU0ntvgZTaVbIJMR0DE,122366
|
|
164
|
-
modal_proto/api_pb2.py,sha256=
|
|
165
|
-
modal_proto/api_pb2.pyi,sha256=
|
|
164
|
+
modal_proto/api_pb2.py,sha256=55fetV2PE1yQ2eChjhd9ACXqApBR-gYfkzFx4z9tjr8,349839
|
|
165
|
+
modal_proto/api_pb2.pyi,sha256=cNkDtLG_wv-Etkr_hJAwl1zqCPEmuOZPI3xdVNP3k6U,477167
|
|
166
166
|
modal_proto/api_pb2_grpc.py,sha256=pIFrNmCOgRRcIW8A1Ekja9Po6fHcsj54ExDZFzTpYe4,264347
|
|
167
167
|
modal_proto/api_pb2_grpc.pyi,sha256=vtxrQ9xnQG6ZRXjp2uk43Mb7wV7F4qGYuVl5JUBc8jI,61968
|
|
168
168
|
modal_proto/modal_api_grpc.py,sha256=Yl_fGbSIuX2FAEnURkYpKqshs7kbNqtz5HlTJEXkbhE,18487
|
|
@@ -174,10 +174,10 @@ modal_proto/options_pb2.pyi,sha256=l7DBrbLO7q3Ir-XDkWsajm0d0TQqqrfuX54i4BMpdQg,1
|
|
|
174
174
|
modal_proto/options_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
175
175
|
modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0yJSI,247
|
|
176
176
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
177
|
-
modal_version/__init__.py,sha256=
|
|
177
|
+
modal_version/__init__.py,sha256=1Khd-4yRHbEhjcI-2bNwD3ryd9flpcpG8FnJneY0Uj8,121
|
|
178
178
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
|
179
|
-
modal-1.0.6.
|
|
180
|
-
modal-1.0.6.
|
|
181
|
-
modal-1.0.6.
|
|
182
|
-
modal-1.0.6.
|
|
183
|
-
modal-1.0.6.
|
|
179
|
+
modal-1.0.6.dev52.dist-info/METADATA,sha256=C7oTd14MU6My_N8EI_EXH73P9VTX7Q_DW0IOhgn5dT4,2462
|
|
180
|
+
modal-1.0.6.dev52.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
|
181
|
+
modal-1.0.6.dev52.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
|
182
|
+
modal-1.0.6.dev52.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
|
183
|
+
modal-1.0.6.dev52.dist-info/RECORD,,
|
modal_proto/api.proto
CHANGED
|
@@ -1690,6 +1690,7 @@ message FunctionGetOutputsRequest {
|
|
|
1690
1690
|
double requested_at = 8; // Used for waypoints.
|
|
1691
1691
|
// The jwts the client expects the server to be processing. This is optional and used for sync inputs only.
|
|
1692
1692
|
repeated string input_jwts = 9;
|
|
1693
|
+
optional int32 start_idx = 10; // for async batch requests. this indicates which index to start from.
|
|
1693
1694
|
}
|
|
1694
1695
|
|
|
1695
1696
|
message FunctionGetOutputsResponse {
|
|
@@ -2524,7 +2525,7 @@ message Sandbox {
|
|
|
2524
2525
|
message SandboxCreateRequest {
|
|
2525
2526
|
string app_id = 1 [ (modal.options.audit_target_attr) = true ];
|
|
2526
2527
|
Sandbox definition = 2;
|
|
2527
|
-
string environment_name = 3;
|
|
2528
|
+
string environment_name = 3; // *DEPRECATED* 7/16/2025
|
|
2528
2529
|
}
|
|
2529
2530
|
|
|
2530
2531
|
message SandboxCreateResponse {
|
|
@@ -2534,6 +2535,7 @@ message SandboxCreateResponse {
|
|
|
2534
2535
|
message SandboxGetFromNameRequest {
|
|
2535
2536
|
string sandbox_name = 1;
|
|
2536
2537
|
string environment_name = 2;
|
|
2538
|
+
string app_name = 3;
|
|
2537
2539
|
}
|
|
2538
2540
|
|
|
2539
2541
|
message SandboxGetFromNameResponse {
|
|
@@ -2608,6 +2610,7 @@ message SandboxListResponse {
|
|
|
2608
2610
|
|
|
2609
2611
|
message SandboxRestoreRequest {
|
|
2610
2612
|
string snapshot_id = 1;
|
|
2613
|
+
string sandbox_name = 2;
|
|
2611
2614
|
}
|
|
2612
2615
|
|
|
2613
2616
|
message SandboxRestoreResponse {
|