modal 1.1.2.dev42__py3-none-any.whl → 1.1.2.dev43__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/cli/secret.py +5 -1
- modal/cli/volume.py +1 -1
- modal/client.pyi +2 -2
- modal/secret.py +17 -0
- modal/secret.pyi +41 -0
- modal/volume.py +16 -0
- modal/volume.pyi +38 -0
- {modal-1.1.2.dev42.dist-info → modal-1.1.2.dev43.dist-info}/METADATA +1 -1
- {modal-1.1.2.dev42.dist-info → modal-1.1.2.dev43.dist-info}/RECORD +14 -14
- modal_version/__init__.py +1 -1
- {modal-1.1.2.dev42.dist-info → modal-1.1.2.dev43.dist-info}/WHEEL +0 -0
- {modal-1.1.2.dev42.dist-info → modal-1.1.2.dev43.dist-info}/entry_points.txt +0 -0
- {modal-1.1.2.dev42.dist-info → modal-1.1.2.dev43.dist-info}/licenses/LICENSE +0 -0
- {modal-1.1.2.dev42.dist-info → modal-1.1.2.dev43.dist-info}/top_level.txt +0 -0
modal/cli/secret.py
CHANGED
@@ -140,7 +140,11 @@ modal secret create my-credentials username=john password="$PASSWORD"
|
|
140
140
|
raise click.UsageError(f"Non-string value for secret '{k}'")
|
141
141
|
|
142
142
|
# Create secret
|
143
|
-
|
143
|
+
if force:
|
144
|
+
# TODO migrate this path once we support Secret.update()?
|
145
|
+
await _Secret._create_deployed(secret_name, env_dict, overwrite=force)
|
146
|
+
else:
|
147
|
+
await _Secret.objects.create(secret_name, env_dict)
|
144
148
|
|
145
149
|
# Print code sample
|
146
150
|
console = make_console()
|
modal/cli/volume.py
CHANGED
@@ -54,7 +54,7 @@ def create(
|
|
54
54
|
version: Optional[int] = Option(default=None, help="VolumeFS version. (Experimental)"),
|
55
55
|
):
|
56
56
|
env_name = ensure_env(env)
|
57
|
-
modal.Volume.
|
57
|
+
modal.Volume.objects.create(name, environment_name=env, version=version)
|
58
58
|
usage_code = f"""
|
59
59
|
@app.function(volumes={{"/my_vol": modal.Volume.from_name("{name}")}})
|
60
60
|
def some_func():
|
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.2.
|
36
|
+
version: str = "1.1.2.dev43",
|
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.2.
|
167
|
+
version: str = "1.1.2.dev43",
|
168
168
|
):
|
169
169
|
"""mdmd:hidden
|
170
170
|
The Modal client object is not intended to be instantiated directly by users.
|
modal/secret.py
CHANGED
@@ -442,6 +442,23 @@ class _Secret(_Object, type_prefix="st"):
|
|
442
442
|
client: Optional[_Client] = None,
|
443
443
|
environment_name: Optional[str] = None,
|
444
444
|
overwrite: bool = False,
|
445
|
+
) -> str:
|
446
|
+
"""mdmd:hidden"""
|
447
|
+
deprecation_warning(
|
448
|
+
(2025, 8, 13),
|
449
|
+
"The undocumented `modal.Secret.create_deployed` method is deprecated and will be removed "
|
450
|
+
"in a future release. It can be replaced with `modal.Secret.objects.create`.",
|
451
|
+
)
|
452
|
+
return await _Secret._create_deployed(deployment_name, env_dict, namespace, client, environment_name, overwrite)
|
453
|
+
|
454
|
+
@staticmethod
|
455
|
+
async def _create_deployed(
|
456
|
+
deployment_name: str,
|
457
|
+
env_dict: dict[str, str],
|
458
|
+
namespace=None, # mdmd:line-hidden
|
459
|
+
client: Optional[_Client] = None,
|
460
|
+
environment_name: Optional[str] = None,
|
461
|
+
overwrite: bool = False,
|
445
462
|
) -> str:
|
446
463
|
"""mdmd:hidden"""
|
447
464
|
warn_if_passing_namespace(namespace, "modal.Secret.create_deployed")
|
modal/secret.pyi
CHANGED
@@ -446,6 +446,18 @@ class _Secret(modal._object._Object):
|
|
446
446
|
"""mdmd:hidden"""
|
447
447
|
...
|
448
448
|
|
449
|
+
@staticmethod
|
450
|
+
async def _create_deployed(
|
451
|
+
deployment_name: str,
|
452
|
+
env_dict: dict[str, str],
|
453
|
+
namespace=None,
|
454
|
+
client: typing.Optional[modal.client._Client] = None,
|
455
|
+
environment_name: typing.Optional[str] = None,
|
456
|
+
overwrite: bool = False,
|
457
|
+
) -> str:
|
458
|
+
"""mdmd:hidden"""
|
459
|
+
...
|
460
|
+
|
449
461
|
async def info(self) -> SecretInfo:
|
450
462
|
"""Return information about the Secret object."""
|
451
463
|
...
|
@@ -598,6 +610,35 @@ class Secret(modal.object.Object):
|
|
598
610
|
|
599
611
|
create_deployed: __create_deployed_spec
|
600
612
|
|
613
|
+
class ___create_deployed_spec(typing_extensions.Protocol):
|
614
|
+
def __call__(
|
615
|
+
self,
|
616
|
+
/,
|
617
|
+
deployment_name: str,
|
618
|
+
env_dict: dict[str, str],
|
619
|
+
namespace=None,
|
620
|
+
client: typing.Optional[modal.client.Client] = None,
|
621
|
+
environment_name: typing.Optional[str] = None,
|
622
|
+
overwrite: bool = False,
|
623
|
+
) -> str:
|
624
|
+
"""mdmd:hidden"""
|
625
|
+
...
|
626
|
+
|
627
|
+
async def aio(
|
628
|
+
self,
|
629
|
+
/,
|
630
|
+
deployment_name: str,
|
631
|
+
env_dict: dict[str, str],
|
632
|
+
namespace=None,
|
633
|
+
client: typing.Optional[modal.client.Client] = None,
|
634
|
+
environment_name: typing.Optional[str] = None,
|
635
|
+
overwrite: bool = False,
|
636
|
+
) -> str:
|
637
|
+
"""mdmd:hidden"""
|
638
|
+
...
|
639
|
+
|
640
|
+
_create_deployed: ___create_deployed_spec
|
641
|
+
|
601
642
|
class __info_spec(typing_extensions.Protocol[SUPERSELF]):
|
602
643
|
def __call__(self, /) -> SecretInfo:
|
603
644
|
"""Return information about the Secret object."""
|
modal/volume.py
CHANGED
@@ -524,6 +524,22 @@ class _Volume(_Object, type_prefix="vo"):
|
|
524
524
|
client: Optional[_Client] = None,
|
525
525
|
environment_name: Optional[str] = None,
|
526
526
|
version: "typing.Optional[modal_proto.api_pb2.VolumeFsVersion.ValueType]" = None,
|
527
|
+
) -> str:
|
528
|
+
"""mdmd:hidden"""
|
529
|
+
deprecation_warning(
|
530
|
+
(2025, 8, 13),
|
531
|
+
"The undocumented `modal.Volume.create_deployed` method is deprecated and will be removed "
|
532
|
+
"in a future release. It can be replaced with `modal.Volume.objects.create`.",
|
533
|
+
)
|
534
|
+
return await _Volume._create_deployed(deployment_name, namespace, client, environment_name, version)
|
535
|
+
|
536
|
+
@staticmethod
|
537
|
+
async def _create_deployed(
|
538
|
+
deployment_name: str,
|
539
|
+
namespace=None, # mdmd:line-hidden
|
540
|
+
client: Optional[_Client] = None,
|
541
|
+
environment_name: Optional[str] = None,
|
542
|
+
version: "typing.Optional[modal_proto.api_pb2.VolumeFsVersion.ValueType]" = None,
|
527
543
|
) -> str:
|
528
544
|
"""mdmd:hidden"""
|
529
545
|
check_object_name(deployment_name, "Volume")
|
modal/volume.pyi
CHANGED
@@ -547,6 +547,17 @@ class _Volume(modal._object._Object):
|
|
547
547
|
"""mdmd:hidden"""
|
548
548
|
...
|
549
549
|
|
550
|
+
@staticmethod
|
551
|
+
async def _create_deployed(
|
552
|
+
deployment_name: str,
|
553
|
+
namespace=None,
|
554
|
+
client: typing.Optional[modal.client._Client] = None,
|
555
|
+
environment_name: typing.Optional[str] = None,
|
556
|
+
version: typing.Optional[int] = None,
|
557
|
+
) -> str:
|
558
|
+
"""mdmd:hidden"""
|
559
|
+
...
|
560
|
+
|
550
561
|
async def info(self) -> VolumeInfo:
|
551
562
|
"""Return information about the Volume object."""
|
552
563
|
...
|
@@ -914,6 +925,33 @@ class Volume(modal.object.Object):
|
|
914
925
|
|
915
926
|
create_deployed: __create_deployed_spec
|
916
927
|
|
928
|
+
class ___create_deployed_spec(typing_extensions.Protocol):
|
929
|
+
def __call__(
|
930
|
+
self,
|
931
|
+
/,
|
932
|
+
deployment_name: str,
|
933
|
+
namespace=None,
|
934
|
+
client: typing.Optional[modal.client.Client] = None,
|
935
|
+
environment_name: typing.Optional[str] = None,
|
936
|
+
version: typing.Optional[int] = None,
|
937
|
+
) -> str:
|
938
|
+
"""mdmd:hidden"""
|
939
|
+
...
|
940
|
+
|
941
|
+
async def aio(
|
942
|
+
self,
|
943
|
+
/,
|
944
|
+
deployment_name: str,
|
945
|
+
namespace=None,
|
946
|
+
client: typing.Optional[modal.client.Client] = None,
|
947
|
+
environment_name: typing.Optional[str] = None,
|
948
|
+
version: typing.Optional[int] = None,
|
949
|
+
) -> str:
|
950
|
+
"""mdmd:hidden"""
|
951
|
+
...
|
952
|
+
|
953
|
+
_create_deployed: ___create_deployed_spec
|
954
|
+
|
917
955
|
class __info_spec(typing_extensions.Protocol[SUPERSELF]):
|
918
956
|
def __call__(self, /) -> VolumeInfo:
|
919
957
|
"""Return information about the Volume object."""
|
@@ -22,7 +22,7 @@ modal/app.py,sha256=RmoW5C7ZdJuv_BkV8waHPTbk7bROpWOynqkNyGrjEL0,48030
|
|
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=
|
25
|
+
modal/client.pyi,sha256=Uj7GEIN3pTESbvS2BmQ_x-glr81bXyk8jMk4J8J99K4,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=1mBcExFrLDTZwkD3Dzu8F26_CL0CGktOV9pE60Y8g_E,40689
|
@@ -69,8 +69,8 @@ modal/sandbox.py,sha256=O_vB-VgJ2ZMw2yyT2-ATYIWHdeDXCPf4cFcc-3JSB5Q,40895
|
|
69
69
|
modal/sandbox.pyi,sha256=HoHgwb167i83qiGhUE7UAy79l45wqfXKfOA9hZ5HiEo,41572
|
70
70
|
modal/schedule.py,sha256=ng0g0AqNY5GQI9KhkXZQ5Wam5G42glbkqVQsNpBtbDE,3078
|
71
71
|
modal/scheduler_placement.py,sha256=BAREdOY5HzHpzSBqt6jDVR6YC_jYfHMVqOzkyqQfngU,1235
|
72
|
-
modal/secret.py,sha256=
|
73
|
-
modal/secret.pyi,sha256=
|
72
|
+
modal/secret.py,sha256=syqkcgFtPUiMIv6m3aXjXeqzCyOaeovoDxHvkSRqVRA,19229
|
73
|
+
modal/secret.pyi,sha256=JiWmFXu_YUjBdzVWctn7TQwVOj_qOSsQLRSUmQuaW34,21294
|
74
74
|
modal/serving.py,sha256=3I3WBeVbzZY258u9PXBCW_dZBgypq3OhwBuTVvlgubE,4423
|
75
75
|
modal/serving.pyi,sha256=YfixTaWikyYpwhnNxCHMZnDDQiPmV1xJ87QF91U_WGU,1924
|
76
76
|
modal/snapshot.py,sha256=E3oxYQkYVRB_LeFBfmUV1Y6vHz8-azXJfC4x7A1QKnI,1455
|
@@ -78,8 +78,8 @@ modal/snapshot.pyi,sha256=0q83hlmWxAhDu8xwZyL5VmYh0i8Tigf7S60or2k30L8,1682
|
|
78
78
|
modal/stream_type.py,sha256=A6320qoAAWhEfwOCZfGtymQTu5AfLfJXXgARqooTPvY,417
|
79
79
|
modal/token_flow.py,sha256=GWpar0gANs71vm9Bd_Cj87UG1K3ljTURbkEjG3JLsrY,7616
|
80
80
|
modal/token_flow.pyi,sha256=eirYjyqbRiT3GCKMIPHJPpkvBTu8WxDKqSHehWaJI_4,2533
|
81
|
-
modal/volume.py,sha256=
|
82
|
-
modal/volume.pyi,sha256=
|
81
|
+
modal/volume.py,sha256=CNzS7I8BI0x6uYUDdvNdMlXHljdFih3RrdgmEOhguIc,53020
|
82
|
+
modal/volume.pyi,sha256=0_71AfI6pRUNPulA_yrz2UwFGxynHx3QNoyZ33Ie8bs,53919
|
83
83
|
modal/_runtime/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
84
84
|
modal/_runtime/asgi.py,sha256=yewQjvqPdXQ9SeEMMM53-h3Y22WlJNe28tFvPrrwguk,22607
|
85
85
|
modal/_runtime/container_io_manager.py,sha256=iiFxPfnJjnZd_l2Aj5TCR_O1dQwBcrvHccq0LSIJGZY,45719
|
@@ -140,10 +140,10 @@ modal/cli/network_file_system.py,sha256=I9IqTpVfk32uKYwGd8LTldkQx6UKYrQYNZ26q7Ab
|
|
140
140
|
modal/cli/profile.py,sha256=g8X6tFFK9ccKyu2he9Yu19WLSLNdztzECgmIV__XJFs,3257
|
141
141
|
modal/cli/queues.py,sha256=5vKtKQ7YExdaxNPYZ0g5suU9sX0-F5h0zy0qBV-hN80,6140
|
142
142
|
modal/cli/run.py,sha256=96m6fpJKbjtva4xzJut0pxS36Z5WCMq0umpAry96im0,24946
|
143
|
-
modal/cli/secret.py,sha256
|
143
|
+
modal/cli/secret.py,sha256=-Nnk3fq1IEzMtC9VUn61AKmdvZzZ9XQyiKVgQYRpajo,8127
|
144
144
|
modal/cli/token.py,sha256=NAmQzKBfEHkcldWKeFxAVIqQBoo1RTp7_A4yc7-8qM0,1911
|
145
145
|
modal/cli/utils.py,sha256=aUXDU9_VgcJrGaGRy4bGf4dqwKYXHCpoO27x4m_bpuo,3293
|
146
|
-
modal/cli/volume.py,sha256=
|
146
|
+
modal/cli/volume.py,sha256=QUHG28kKuL0UG6gO3wNdLQD1yVBUNVNZL70bxs0jBNo,10759
|
147
147
|
modal/cli/programs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
|
148
148
|
modal/cli/programs/launch_instance_ssh.py,sha256=GrwK_Vy8-7B4x5a6AqFaF7lqNVgu75JYZ2BtFV0_DOw,2660
|
149
149
|
modal/cli/programs/run_jupyter.py,sha256=44Lpvqk2l3hH-uOkmAOzw60NEsfB5uaRDWDKVshvQhs,2682
|
@@ -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.2.
|
156
|
+
modal-1.1.2.dev43.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=
|
179
|
+
modal_version/__init__.py,sha256=kq3FWk25Kqf0MCAHGDyYKufuCu_-GkgUP-fQaNTRmGE,121
|
180
180
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
181
|
-
modal-1.1.2.
|
182
|
-
modal-1.1.2.
|
183
|
-
modal-1.1.2.
|
184
|
-
modal-1.1.2.
|
185
|
-
modal-1.1.2.
|
181
|
+
modal-1.1.2.dev43.dist-info/METADATA,sha256=TYbh1FG98BWr58qrSTpJ9RtoIHqft1FBt_3hScvHEm4,2460
|
182
|
+
modal-1.1.2.dev43.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
183
|
+
modal-1.1.2.dev43.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
184
|
+
modal-1.1.2.dev43.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
185
|
+
modal-1.1.2.dev43.dist-info/RECORD,,
|
modal_version/__init__.py
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|