modal 0.74.35__py3-none-any.whl → 0.74.36__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
@@ -451,6 +451,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
451
451
  is_auto_snapshot: bool = False,
452
452
  enable_memory_snapshot: bool = False,
453
453
  block_network: bool = False,
454
+ restrict_modal_access: bool = False,
454
455
  i6pn_enabled: bool = False,
455
456
  # Experimental: Clustered functions
456
457
  cluster_size: Optional[int] = None,
@@ -809,6 +810,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
809
810
  checkpointing_enabled=enable_memory_snapshot,
810
811
  object_dependencies=object_dependencies,
811
812
  block_network=block_network,
813
+ untrusted=restrict_modal_access,
812
814
  max_inputs=max_inputs or 0,
813
815
  cloud_bucket_mounts=cloud_bucket_mounts_to_proto(cloud_bucket_mounts),
814
816
  scheduler_placement=scheduler_placement.proto if scheduler_placement else None,
@@ -865,6 +867,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
865
867
  snapshot_debug=function_definition.snapshot_debug,
866
868
  runtime_perf_record=function_definition.runtime_perf_record,
867
869
  function_schema=function_schema,
870
+ untrusted=function_definition.untrusted,
868
871
  )
869
872
 
870
873
  ranked_functions = []
modal/app.py CHANGED
@@ -670,6 +670,7 @@ class _App:
670
670
  region: Optional[Union[str, Sequence[str]]] = None, # Region or regions to run the function on.
671
671
  enable_memory_snapshot: bool = False, # Enable memory checkpointing for faster cold starts.
672
672
  block_network: bool = False, # Whether to block network access
673
+ restrict_modal_access: bool = False, # Whether to allow this function access to other Modal resources
673
674
  # Maximum number of inputs a container should handle before shutting down.
674
675
  # With `max_inputs = 1`, containers will be single-use.
675
676
  max_inputs: Optional[int] = None,
@@ -844,6 +845,7 @@ class _App:
844
845
  webhook_config=webhook_config,
845
846
  enable_memory_snapshot=enable_memory_snapshot,
846
847
  block_network=block_network,
848
+ restrict_modal_access=restrict_modal_access,
847
849
  max_inputs=max_inputs,
848
850
  scheduler_placement=scheduler_placement,
849
851
  i6pn_enabled=i6pn_enabled,
@@ -898,6 +900,7 @@ class _App:
898
900
  region: Optional[Union[str, Sequence[str]]] = None, # Region or regions to run the function on.
899
901
  enable_memory_snapshot: bool = False, # Enable memory checkpointing for faster cold starts.
900
902
  block_network: bool = False, # Whether to block network access
903
+ restrict_modal_access: bool = False, # Whether to allow this class access to other Modal resources
901
904
  # Limits the number of inputs a container handles before shutting down.
902
905
  # Use `max_inputs = 1` for single-use containers.
903
906
  max_inputs: Optional[int] = None,
@@ -1013,6 +1016,7 @@ class _App:
1013
1016
  cloud=cloud,
1014
1017
  enable_memory_snapshot=enable_memory_snapshot,
1015
1018
  block_network=block_network,
1019
+ restrict_modal_access=restrict_modal_access,
1016
1020
  max_inputs=max_inputs,
1017
1021
  scheduler_placement=scheduler_placement,
1018
1022
  include_source=include_source if include_source is not None else self._include_source_default,
modal/app.pyi CHANGED
@@ -198,6 +198,7 @@ class _App:
198
198
  region: typing.Union[str, collections.abc.Sequence[str], None] = None,
199
199
  enable_memory_snapshot: bool = False,
200
200
  block_network: bool = False,
201
+ restrict_modal_access: bool = False,
201
202
  max_inputs: typing.Optional[int] = None,
202
203
  i6pn: typing.Optional[bool] = None,
203
204
  include_source: typing.Optional[bool] = None,
@@ -247,6 +248,7 @@ class _App:
247
248
  region: typing.Union[str, collections.abc.Sequence[str], None] = None,
248
249
  enable_memory_snapshot: bool = False,
249
250
  block_network: bool = False,
251
+ restrict_modal_access: bool = False,
250
252
  max_inputs: typing.Optional[int] = None,
251
253
  include_source: typing.Optional[bool] = None,
252
254
  experimental_options: typing.Optional[dict[str, typing.Any]] = None,
@@ -464,6 +466,7 @@ class App:
464
466
  region: typing.Union[str, collections.abc.Sequence[str], None] = None,
465
467
  enable_memory_snapshot: bool = False,
466
468
  block_network: bool = False,
469
+ restrict_modal_access: bool = False,
467
470
  max_inputs: typing.Optional[int] = None,
468
471
  i6pn: typing.Optional[bool] = None,
469
472
  include_source: typing.Optional[bool] = None,
@@ -513,6 +516,7 @@ class App:
513
516
  region: typing.Union[str, collections.abc.Sequence[str], None] = None,
514
517
  enable_memory_snapshot: bool = False,
515
518
  block_network: bool = False,
519
+ restrict_modal_access: bool = False,
516
520
  max_inputs: typing.Optional[int] = None,
517
521
  include_source: typing.Optional[bool] = None,
518
522
  experimental_options: typing.Optional[dict[str, typing.Any]] = None,
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.74.35"
30
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.74.36"
31
31
  ): ...
32
32
  def is_closed(self) -> bool: ...
33
33
  @property
@@ -85,7 +85,7 @@ class Client:
85
85
  _snapshotted: bool
86
86
 
87
87
  def __init__(
88
- self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.74.35"
88
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.74.36"
89
89
  ): ...
90
90
  def is_closed(self) -> bool: ...
91
91
  @property
modal/functions.pyi CHANGED
@@ -91,6 +91,7 @@ class Function(
91
91
  is_auto_snapshot: bool = False,
92
92
  enable_memory_snapshot: bool = False,
93
93
  block_network: bool = False,
94
+ restrict_modal_access: bool = False,
94
95
  i6pn_enabled: bool = False,
95
96
  cluster_size: typing.Optional[int] = None,
96
97
  max_inputs: typing.Optional[int] = None,
@@ -197,11 +198,11 @@ class Function(
197
198
 
198
199
  _call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
199
200
 
200
- class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
201
+ class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
201
202
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
202
203
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
203
204
 
204
- remote: __remote_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
205
+ remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
205
206
 
206
207
  class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
207
208
  def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
@@ -216,19 +217,19 @@ class Function(
216
217
  self, *args: modal._functions.P.args, **kwargs: modal._functions.P.kwargs
217
218
  ) -> modal._functions.OriginalReturnType: ...
218
219
 
219
- class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
220
+ class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
220
221
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
221
222
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
222
223
 
223
224
  _experimental_spawn: ___experimental_spawn_spec[
224
- modal._functions.ReturnType, modal._functions.P, typing_extensions.Self
225
+ modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
225
226
  ]
226
227
 
227
- class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
228
+ class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
228
229
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
229
230
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
230
231
 
231
- spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
232
+ spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
232
233
 
233
234
  def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
234
235
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 0.74.35
3
+ Version: 0.74.36
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=sTJcc9EbDuCKSwg3tL6ZckFw9WWdlkXW8mId1IvJCNc,2846
3
3
  modal/_clustered_functions.py,sha256=kTf-9YBXY88NutC1akI-gCbvf01RhMPCw-zoOI_YIUE,2700
4
4
  modal/_clustered_functions.pyi,sha256=vllkegc99A0jrUOWa8mdlSbdp6uz36TsHhGxysAOpaQ,771
5
5
  modal/_container_entrypoint.py,sha256=DymOImhc3uGRkIq_qXmBsEbWMB4EBMpfuXzz2S4BcGg,29404
6
- modal/_functions.py,sha256=SAne05DDItfyywxXxh_WpmUuSq5BXOc3DXbCsveQhao,74070
6
+ modal/_functions.py,sha256=R6L5cWIy2Lls6O6_taAIalUCigXwm1VU5Kb98Qffxr0,74233
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=JBIECWdfpRKCaCxVWZbC3Q1kF5Whk_EKvY9f4Y6AFyg,11446
@@ -18,11 +18,11 @@ modal/_tunnel.py,sha256=zTBxBiuH1O22tS1OliAJdIsSmaZS8PlnifS_6S5z-mk,6320
18
18
  modal/_tunnel.pyi,sha256=JmmDYAy9F1FpgJ_hWx0xkom2nTOFQjn4mTPYlU3PFo4,1245
19
19
  modal/_type_manager.py,sha256=DWjgmjYJuOagw2erin506UUbG2H5UzZCFEekS-7hmfA,9087
20
20
  modal/_watcher.py,sha256=K6LYnlmSGQB4tWWI9JADv-tvSvQ1j522FwT71B51CX8,3584
21
- modal/app.py,sha256=VQPV0u6zqePdocBZS6Tgjf_we7aSrLtvqqXmZNdMfBQ,50890
22
- modal/app.pyi,sha256=Dq7cfzkW8HR6Ud6L6YueZucHelEUYnGUc6BKn8KWpIk,28420
21
+ modal/app.py,sha256=r-9vVU1lrR1CWtJEo60fuaianvxY_oOXZyv1Qx1DEkI,51231
22
+ modal/app.pyi,sha256=0QNtnUpAFbOPcbwCt119ge7OmoBqMFw5SajLgdE5eOw,28600
23
23
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
24
24
  modal/client.py,sha256=U-YKSw0n7J1ZLREt9cbEJCtmHe5YoPKFxl0xlkan2yc,15565
25
- modal/client.pyi,sha256=W8jzPAxQG5hyTiq1F_5ZLrC977LugsbOhLKh8GeOhp0,7593
25
+ modal/client.pyi,sha256=yrQXreTvJi46vq-vrgdzAcPh8EHpMScF0oPDDDk9eJM,7593
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=pfEKqzNldQbtoM45CApRhSd8jJ7hD6o-83SLX8DTXXk,33549
@@ -39,7 +39,7 @@ modal/file_io.py,sha256=lcMs_E9Xfm0YX1t9U2wNIBPnqHRxmImqjLW1GHqVmyg,20945
39
39
  modal/file_io.pyi,sha256=NTRft1tbPSWf9TlWVeZmTlgB5AZ_Zhu2srWIrWr7brk,9445
40
40
  modal/file_pattern_matcher.py,sha256=trosX-Bp7dOubudN1bLLhRAoidWy1TcoaR4Pv8CedWw,6497
41
41
  modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
42
- modal/functions.pyi,sha256=3tWMx_9DTgznGLnT7yz_UTZxG-nMRXw82-I5gn58MKs,14825
42
+ modal/functions.pyi,sha256=crMI93dnZoO4-ardLGOYgIay5KSMb5S0Oyc0e9Pr3GI,14870
43
43
  modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
44
44
  modal/image.py,sha256=ZCghS6l1O7pezXcdMHk6RoJpW3qWszfWGJTW38lNXaU,92797
45
45
  modal/image.pyi,sha256=ddbegF532pDLiVANOJdtJiYoDbbF3mAFrsCiyvIu7jU,25632
@@ -145,7 +145,7 @@ modal/requirements/2024.10.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddR
145
145
  modal/requirements/PREVIEW.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddRo,296
146
146
  modal/requirements/README.md,sha256=9tK76KP0Uph7O0M5oUgsSwEZDj5y-dcUPsnpR0Sc-Ik,854
147
147
  modal/requirements/base-images.json,sha256=57vMSqzMbLBxw5tFWSaMiIkkVEps4JfX5PAtXGnkS4U,740
148
- modal-0.74.35.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
148
+ modal-0.74.36.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
149
149
  modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
150
150
  modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
151
151
  modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
@@ -170,9 +170,9 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
170
170
  modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
171
171
  modal_version/__init__.py,sha256=m94xZNWIjH8oUtJk4l9xfovzDJede2o7X-q0MHVECtM,470
172
172
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
173
- modal_version/_version_generated.py,sha256=-59aQNFXhXTfAq3zrCadn12qASoM94FJ7KwPql6xPeM,149
174
- modal-0.74.35.dist-info/METADATA,sha256=p--yf4M8a4i8UHjnG-D8jBhb1jOX57kKyQDWbTW1Mto,2474
175
- modal-0.74.35.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
176
- modal-0.74.35.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
177
- modal-0.74.35.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
178
- modal-0.74.35.dist-info/RECORD,,
173
+ modal_version/_version_generated.py,sha256=I-tPv6yWobVByQ9BxHY-Y5dWvxeNqgqz_xwnrYYKB8k,149
174
+ modal-0.74.36.dist-info/METADATA,sha256=iBMQ_rohLYJrEG6fZ7zCyDwkFahyFQFZhKrupdUmpEM,2474
175
+ modal-0.74.36.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
176
+ modal-0.74.36.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
177
+ modal-0.74.36.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
178
+ modal-0.74.36.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 = 35 # git: ba088da
4
+ build_number = 36 # git: 69369e6