modal 0.74.21__py3-none-any.whl → 0.74.22__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 +26 -3
- modal/client.pyi +2 -2
- modal/functions.pyi +6 -6
- {modal-0.74.21.dist-info → modal-0.74.22.dist-info}/METADATA +1 -1
- {modal-0.74.21.dist-info → modal-0.74.22.dist-info}/RECORD +10 -10
- modal_version/_version_generated.py +1 -1
- {modal-0.74.21.dist-info → modal-0.74.22.dist-info}/WHEEL +0 -0
- {modal-0.74.21.dist-info → modal-0.74.22.dist-info}/entry_points.txt +0 -0
- {modal-0.74.21.dist-info → modal-0.74.22.dist-info}/licenses/LICENSE +0 -0
- {modal-0.74.21.dist-info → modal-0.74.22.dist-info}/top_level.txt +0 -0
modal/cli/secret.py
CHANGED
@@ -9,10 +9,11 @@ import click
|
|
9
9
|
import typer
|
10
10
|
from rich.console import Console
|
11
11
|
from rich.syntax import Syntax
|
12
|
+
from typer import Argument
|
12
13
|
|
13
14
|
from modal._utils.async_utils import synchronizer
|
14
15
|
from modal._utils.grpc_utils import retry_transient_errors
|
15
|
-
from modal.cli.utils import ENV_OPTION, display_table, timestamp_to_local
|
16
|
+
from modal.cli.utils import ENV_OPTION, YES_OPTION, display_table, timestamp_to_local
|
16
17
|
from modal.client import _Client
|
17
18
|
from modal.environments import ensure_env
|
18
19
|
from modal.secret import _Secret
|
@@ -23,7 +24,7 @@ secret_cli = typer.Typer(name="secret", help="Manage secrets.", no_args_is_help=
|
|
23
24
|
|
24
25
|
@secret_cli.command("list", help="List your published secrets.")
|
25
26
|
@synchronizer.create_blocking
|
26
|
-
async def list_(env: Optional[str] = ENV_OPTION, json:
|
27
|
+
async def list_(env: Optional[str] = ENV_OPTION, json: bool = False):
|
27
28
|
env = ensure_env(env)
|
28
29
|
client = await _Client.from_env()
|
29
30
|
response = await retry_transient_errors(client.stub.SecretList, api_pb2.SecretListRequest(environment_name=env))
|
@@ -43,7 +44,7 @@ async def list_(env: Optional[str] = ENV_OPTION, json: Optional[bool] = False):
|
|
43
44
|
display_table(column_names, rows, json, title=f"Secrets{env_part}")
|
44
45
|
|
45
46
|
|
46
|
-
@secret_cli.command("create", help="Create a new secret.
|
47
|
+
@secret_cli.command("create", help="Create a new secret.")
|
47
48
|
@synchronizer.create_blocking
|
48
49
|
async def create(
|
49
50
|
secret_name,
|
@@ -91,6 +92,28 @@ def some_function():
|
|
91
92
|
console.print(Syntax(example_code, "python"))
|
92
93
|
|
93
94
|
|
95
|
+
@secret_cli.command("delete", help="Delete a named secret.")
|
96
|
+
@synchronizer.create_blocking
|
97
|
+
async def delete(
|
98
|
+
secret_name: str = Argument(help="Name of the modal.Secret to be deleted. Case sensitive"),
|
99
|
+
yes: bool = YES_OPTION,
|
100
|
+
env: Optional[str] = ENV_OPTION,
|
101
|
+
):
|
102
|
+
"""TODO"""
|
103
|
+
env = ensure_env(env)
|
104
|
+
secret = await _Secret.from_name(secret_name, environment_name=env).hydrate()
|
105
|
+
if not yes:
|
106
|
+
typer.confirm(
|
107
|
+
f"Are you sure you want to irrevocably delete the modal.Secret '{secret_name}'?",
|
108
|
+
default=False,
|
109
|
+
abort=True,
|
110
|
+
)
|
111
|
+
client = await _Client.from_env()
|
112
|
+
|
113
|
+
# TODO: replace with API on `modal.Secret` when we add it
|
114
|
+
await client.stub.SecretDelete(api_pb2.SecretDeleteRequest(secret_id=secret.object_id))
|
115
|
+
|
116
|
+
|
94
117
|
def get_text_from_editor(key) -> str:
|
95
118
|
with NamedTemporaryFile("w+", prefix="secret_buffer", suffix=".txt") as bufferfile:
|
96
119
|
if platform.system() != "Windows":
|
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.
|
30
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.74.22"
|
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.
|
88
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.74.22"
|
89
89
|
): ...
|
90
90
|
def is_closed(self) -> bool: ...
|
91
91
|
@property
|
modal/functions.pyi
CHANGED
@@ -200,11 +200,11 @@ class Function(
|
|
200
200
|
|
201
201
|
_call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
|
202
202
|
|
203
|
-
class __remote_spec(typing_extensions.Protocol[
|
203
|
+
class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
204
204
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
205
205
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
206
206
|
|
207
|
-
remote: __remote_spec[modal._functions.
|
207
|
+
remote: __remote_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
|
208
208
|
|
209
209
|
class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
210
210
|
def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
|
@@ -219,19 +219,19 @@ class Function(
|
|
219
219
|
self, *args: modal._functions.P.args, **kwargs: modal._functions.P.kwargs
|
220
220
|
) -> modal._functions.OriginalReturnType: ...
|
221
221
|
|
222
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
222
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
223
223
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
224
224
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
225
225
|
|
226
226
|
_experimental_spawn: ___experimental_spawn_spec[
|
227
|
-
modal._functions.
|
227
|
+
modal._functions.ReturnType, modal._functions.P, typing_extensions.Self
|
228
228
|
]
|
229
229
|
|
230
|
-
class __spawn_spec(typing_extensions.Protocol[
|
230
|
+
class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
231
231
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
232
232
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
233
233
|
|
234
|
-
spawn: __spawn_spec[modal._functions.
|
234
|
+
spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
|
235
235
|
|
236
236
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
|
237
237
|
|
@@ -22,7 +22,7 @@ modal/app.py,sha256=pfVe8VH56foho4uqdQJCbn0HST_ihh0qUGqmAMNrfWw,50822
|
|
22
22
|
modal/app.pyi,sha256=xM5u8WuGRRAWAQ0m2cd2PowJOgqI3M87hcq-AAM6XBQ,28286
|
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=
|
25
|
+
modal/client.pyi,sha256=NnTxo1sF21qWO_wYJKpT1ISjiX75dL0P4E4o-JomYaw,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=GvaNl8R5UsH7Vg88WEOyerdjvZEPK7xxi3nqHlyOW_c,33497
|
@@ -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=
|
42
|
+
modal/functions.pyi,sha256=xmxnIyhkNJk7VZdAVJnWpP9CVIvi9X5w8t-WrPOJnDc,14805
|
43
43
|
modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
|
44
44
|
modal/image.py,sha256=I-9_YZL0SSfnuGPywa3-4PlxDmJ-53p7ce3gP74SrOA,92877
|
45
45
|
modal/image.pyi,sha256=89zv12C1sFrJs7Es9SnX23_m208ASAdeNGCVTrhjzHI,25632
|
@@ -129,7 +129,7 @@ modal/cli/network_file_system.py,sha256=eq3JnwjbfFNsJodIyANHL06ByYc3BSavzdmu8C96
|
|
129
129
|
modal/cli/profile.py,sha256=0TYhgRSGUvQZ5LH9nkl6iZllEvAjDniES264dE57wOM,3201
|
130
130
|
modal/cli/queues.py,sha256=6gTu76dzBtPN5eQVsLrvQpuru5jI9ZCWK5Eh8J8XhaM,4498
|
131
131
|
modal/cli/run.py,sha256=DPa-yQ9o7vjqwvs_TAOvVJxS51yVn__ZGCnbkORL37g,23972
|
132
|
-
modal/cli/secret.py,sha256=
|
132
|
+
modal/cli/secret.py,sha256=Zfscah1gLi8vyMCxYgy1z9lpI-0xfVI_EjyV5ElkL8Q,4967
|
133
133
|
modal/cli/token.py,sha256=mxSgOWakXG6N71hQb1ko61XAR9ZGkTMZD-Txn7gmTac,1924
|
134
134
|
modal/cli/utils.py,sha256=hZmjyzcPjDnQSkLvycZD2LhGdcsfdZshs_rOU78EpvI,3717
|
135
135
|
modal/cli/volume.py,sha256=_PJ5Vn_prkLk_x1Lksx4kZySlKWqIn36T2Edd1-h7Mg,10497
|
@@ -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.
|
148
|
+
modal-0.74.22.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=
|
174
|
-
modal-0.74.
|
175
|
-
modal-0.74.
|
176
|
-
modal-0.74.
|
177
|
-
modal-0.74.
|
178
|
-
modal-0.74.
|
173
|
+
modal_version/_version_generated.py,sha256=_YHkedzYAaMz7etjva8YLF62tjGqxAGjl_wAiMAl640,149
|
174
|
+
modal-0.74.22.dist-info/METADATA,sha256=MssMtDGV-b1r-3_CVID4rkteD8bttMxjko4-RSH4XJs,2474
|
175
|
+
modal-0.74.22.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
176
|
+
modal-0.74.22.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
177
|
+
modal-0.74.22.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
178
|
+
modal-0.74.22.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|