modal 0.71.10__py3-none-any.whl → 0.71.11__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/volume.py +23 -0
- modal/client.pyi +2 -2
- modal/volume.py +12 -0
- modal/volume.pyi +28 -0
- {modal-0.71.10.dist-info → modal-0.71.11.dist-info}/METADATA +1 -1
- {modal-0.71.10.dist-info → modal-0.71.11.dist-info}/RECORD +11 -11
- modal_version/_version_generated.py +1 -1
- {modal-0.71.10.dist-info → modal-0.71.11.dist-info}/LICENSE +0 -0
- {modal-0.71.10.dist-info → modal-0.71.11.dist-info}/WHEEL +0 -0
- {modal-0.71.10.dist-info → modal-0.71.11.dist-info}/entry_points.txt +0 -0
- {modal-0.71.10.dist-info → modal-0.71.11.dist-info}/top_level.txt +0 -0
modal/cli/volume.py
CHANGED
@@ -287,3 +287,26 @@ async def delete(
|
|
287
287
|
)
|
288
288
|
|
289
289
|
await _Volume.delete(volume_name, environment_name=env)
|
290
|
+
|
291
|
+
|
292
|
+
@volume_cli.command(
|
293
|
+
name="rename",
|
294
|
+
help="Rename a modal.Volume.",
|
295
|
+
rich_help_panel="Management",
|
296
|
+
)
|
297
|
+
@synchronizer.create_blocking
|
298
|
+
async def rename(
|
299
|
+
old_name: str,
|
300
|
+
new_name: str,
|
301
|
+
yes: bool = YES_OPTION,
|
302
|
+
env: Optional[str] = ENV_OPTION,
|
303
|
+
):
|
304
|
+
if not yes:
|
305
|
+
typer.confirm(
|
306
|
+
f"Are you sure you want rename the modal.Volume '{old_name}'?"
|
307
|
+
" This may break any Apps currently using it.",
|
308
|
+
default=False,
|
309
|
+
abort=True,
|
310
|
+
)
|
311
|
+
|
312
|
+
await _Volume.rename(old_name, new_name, environment_name=env)
|
modal/client.pyi
CHANGED
@@ -26,7 +26,7 @@ class _Client:
|
|
26
26
|
_stub: typing.Optional[modal_proto.api_grpc.ModalClientStub]
|
27
27
|
|
28
28
|
def __init__(
|
29
|
-
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.71.
|
29
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.71.11"
|
30
30
|
): ...
|
31
31
|
def is_closed(self) -> bool: ...
|
32
32
|
@property
|
@@ -81,7 +81,7 @@ class Client:
|
|
81
81
|
_stub: typing.Optional[modal_proto.api_grpc.ModalClientStub]
|
82
82
|
|
83
83
|
def __init__(
|
84
|
-
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.71.
|
84
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.71.11"
|
85
85
|
): ...
|
86
86
|
def is_closed(self) -> bool: ...
|
87
87
|
@property
|
modal/volume.py
CHANGED
@@ -506,6 +506,18 @@ class _Volume(_Object, type_prefix="vo"):
|
|
506
506
|
req = api_pb2.VolumeDeleteRequest(volume_id=obj.object_id)
|
507
507
|
await retry_transient_errors(obj._client.stub.VolumeDelete, req)
|
508
508
|
|
509
|
+
@staticmethod
|
510
|
+
async def rename(
|
511
|
+
old_name: str,
|
512
|
+
new_name: str,
|
513
|
+
*,
|
514
|
+
client: Optional[_Client] = None,
|
515
|
+
environment_name: Optional[str] = None,
|
516
|
+
):
|
517
|
+
obj = await _Volume.lookup(old_name, client=client, environment_name=environment_name)
|
518
|
+
req = api_pb2.VolumeRenameRequest(volume_id=obj.object_id, name=new_name)
|
519
|
+
await retry_transient_errors(obj._client.stub.VolumeRename, req)
|
520
|
+
|
509
521
|
|
510
522
|
class _VolumeUploadContextManager:
|
511
523
|
"""Context manager for batch-uploading files to a Volume."""
|
modal/volume.pyi
CHANGED
@@ -85,6 +85,14 @@ class _Volume(modal.object._Object):
|
|
85
85
|
async def delete(
|
86
86
|
name: str, client: typing.Optional[modal.client._Client] = None, environment_name: typing.Optional[str] = None
|
87
87
|
): ...
|
88
|
+
@staticmethod
|
89
|
+
async def rename(
|
90
|
+
old_name: str,
|
91
|
+
new_name: str,
|
92
|
+
*,
|
93
|
+
client: typing.Optional[modal.client._Client] = None,
|
94
|
+
environment_name: typing.Optional[str] = None,
|
95
|
+
): ...
|
88
96
|
|
89
97
|
class _VolumeUploadContextManager:
|
90
98
|
_volume_id: str
|
@@ -272,6 +280,26 @@ class Volume(modal.object.Object):
|
|
272
280
|
|
273
281
|
delete: __delete_spec
|
274
282
|
|
283
|
+
class __rename_spec(typing_extensions.Protocol):
|
284
|
+
def __call__(
|
285
|
+
self,
|
286
|
+
old_name: str,
|
287
|
+
new_name: str,
|
288
|
+
*,
|
289
|
+
client: typing.Optional[modal.client.Client] = None,
|
290
|
+
environment_name: typing.Optional[str] = None,
|
291
|
+
): ...
|
292
|
+
async def aio(
|
293
|
+
self,
|
294
|
+
old_name: str,
|
295
|
+
new_name: str,
|
296
|
+
*,
|
297
|
+
client: typing.Optional[modal.client.Client] = None,
|
298
|
+
environment_name: typing.Optional[str] = None,
|
299
|
+
): ...
|
300
|
+
|
301
|
+
rename: __rename_spec
|
302
|
+
|
275
303
|
class VolumeUploadContextManager:
|
276
304
|
_volume_id: str
|
277
305
|
_client: modal.client.Client
|
@@ -19,7 +19,7 @@ modal/app.py,sha256=vEE0cK5QPF6_cdW5AJvcuWxz5KmeprHwBEtlDkVRHgE,45582
|
|
19
19
|
modal/app.pyi,sha256=Gx7gxjfQ70sxhbwfpx1VjvzEON-ZEMTJ_Vy8qt0oQvo,25302
|
20
20
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
21
21
|
modal/client.py,sha256=JAnd4-GCN093BwkvOFAK5a6iy5ycxofjpUncMxlrIMw,15253
|
22
|
-
modal/client.pyi,sha256=
|
22
|
+
modal/client.pyi,sha256=jqYgrQjYnu7lAMwMBBYq0xgDfThCeXi9pTUVaQe6Dr0,7280
|
23
23
|
modal/cloud_bucket_mount.py,sha256=G7T7jWLD0QkmrfKR75mSTwdUZ2xNfj7pkVqb4ipmxmI,5735
|
24
24
|
modal/cloud_bucket_mount.pyi,sha256=CEi7vrH3kDUF4LAy4qP6tfImy2UJuFRcRbsgRNM1wo8,1403
|
25
25
|
modal/cls.py,sha256=3hjb0JcoPjxKZNeK22f5rR43bZRBjoRI7_EMZXY7YrE,31172
|
@@ -74,8 +74,8 @@ modal/serving.pyi,sha256=ncV-9jY_vZYFnGs5ZnMb3ffrX8LmcLdIMHBC56xRbtE,1711
|
|
74
74
|
modal/stream_type.py,sha256=A6320qoAAWhEfwOCZfGtymQTu5AfLfJXXgARqooTPvY,417
|
75
75
|
modal/token_flow.py,sha256=LcgSce_MSQ2p7j55DPwpVRpiAtCDe8GRSEwzO7muNR8,6774
|
76
76
|
modal/token_flow.pyi,sha256=gOYtYujrWt_JFZeiI8EmfahXPx5GCR5Na-VaPQcWgEY,1937
|
77
|
-
modal/volume.py,sha256=
|
78
|
-
modal/volume.pyi,sha256=
|
77
|
+
modal/volume.py,sha256=NoqdOTrjSUEBkUj-Of_oi7I_yCuNmaLqr3TIsTWOddM,29674
|
78
|
+
modal/volume.pyi,sha256=GfyVeLyM7DMiBlg0I5N6OtJl0Bzv0-rNQXkWVO0j5c0,11903
|
79
79
|
modal/_runtime/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
80
80
|
modal/_runtime/asgi.py,sha256=c4hmaMW1pLo-cm7ouriJjieuFm4ZF6D2LMy0638sfOs,22139
|
81
81
|
modal/_runtime/container_io_manager.py,sha256=HgDLjE78yy1P7WZTmsEVDf89YnFFWG63Ddes8uYLVDY,43764
|
@@ -123,7 +123,7 @@ modal/cli/run.py,sha256=QMs3BVSkq8jve76BqgstGt4C6jilbDD9gpCCRPuHUy0,17879
|
|
123
123
|
modal/cli/secret.py,sha256=uQpwYrMY98iMCWeZOQTcktOYhPTZ8IHnyealDc2CZqo,4206
|
124
124
|
modal/cli/token.py,sha256=mxSgOWakXG6N71hQb1ko61XAR9ZGkTMZD-Txn7gmTac,1924
|
125
125
|
modal/cli/utils.py,sha256=hZmjyzcPjDnQSkLvycZD2LhGdcsfdZshs_rOU78EpvI,3717
|
126
|
-
modal/cli/volume.py,sha256=
|
126
|
+
modal/cli/volume.py,sha256=Jrm-1R9u92JbbUM62bkB9RzAM_jO8wi7T2-i6Cb2XG0,10568
|
127
127
|
modal/cli/programs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
|
128
128
|
modal/cli/programs/run_jupyter.py,sha256=RRr07CqZrStMbLdBM3PpzU6KM8t9FtLbdIPthg2-Mpw,2755
|
129
129
|
modal/cli/programs/vscode.py,sha256=m80wuQyTALTc7y-kAVqmMjtrcb6muCtpuhxsJm4Va2Y,3453
|
@@ -165,10 +165,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
|
|
165
165
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
166
166
|
modal_version/__init__.py,sha256=BEBWj9tcbFUwzEjUrqly601rauw5cYsHdcmJHs3iu0s,470
|
167
167
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
168
|
-
modal_version/_version_generated.py,sha256=
|
169
|
-
modal-0.71.
|
170
|
-
modal-0.71.
|
171
|
-
modal-0.71.
|
172
|
-
modal-0.71.
|
173
|
-
modal-0.71.
|
174
|
-
modal-0.71.
|
168
|
+
modal_version/_version_generated.py,sha256=fQQSIukEWsXCWwuMN72ljSfl8oj3I6r0wlCYhDTmb3A,149
|
169
|
+
modal-0.71.11.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
170
|
+
modal-0.71.11.dist-info/METADATA,sha256=BYd6BdWjfQ9O-SwR0Q9gHj727pfTmPMvEfP959JL2j4,2329
|
171
|
+
modal-0.71.11.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
172
|
+
modal-0.71.11.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
173
|
+
modal-0.71.11.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
|
174
|
+
modal-0.71.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|