modal 1.1.2.dev14__tar.gz → 1.1.2.dev16__tar.gz
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-1.1.2.dev14 → modal-1.1.2.dev16}/PKG-INFO +1 -1
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/dict.py +8 -4
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/queues.py +9 -4
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/secret.py +7 -10
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/volume.py +7 -6
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/client.pyi +2 -2
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/dict.py +47 -4
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/dict.pyi +118 -3
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/functions.pyi +6 -6
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/queue.py +49 -4
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/queue.pyi +118 -3
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/secret.py +33 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/secret.pyi +83 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/volume.py +49 -4
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/volume.pyi +118 -3
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal.egg-info/PKG-INFO +1 -1
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_proto/api.proto +8 -4
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_proto/api_pb2.py +596 -596
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_proto/api_pb2.pyi +12 -7
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_version/__init__.py +1 -1
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/LICENSE +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/README.md +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/__init__.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/__main__.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_clustered_functions.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_clustered_functions.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_container_entrypoint.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_functions.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_ipython.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_location.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_object.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_output.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_partial_function.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_pty.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_resolver.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_resources.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_runtime/__init__.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_runtime/asgi.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_runtime/container_io_manager.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_runtime/container_io_manager.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_runtime/execution_context.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_runtime/execution_context.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_runtime/gpu_memory_snapshot.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_runtime/telemetry.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_runtime/user_code_imports.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_serialization.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_traceback.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_tunnel.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_tunnel.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_type_manager.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/__init__.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/app_utils.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/async_utils.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/auth_token_manager.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/blob_utils.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/bytes_io_segment_payload.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/deprecation.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/docker_utils.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/function_utils.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/git_utils.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/grpc_testing.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/grpc_utils.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/hash_utils.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/http_utils.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/jwt_utils.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/logger.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/mount_utils.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/name_utils.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/package_utils.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/pattern_utils.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/rand_pb_testing.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/shell_utils.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_utils/time_utils.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_vendor/__init__.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_vendor/a2wsgi_wsgi.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_vendor/cloudpickle.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_vendor/tblib.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/_watcher.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/app.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/app.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/builder/2023.12.312.txt +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/builder/2023.12.txt +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/builder/2024.04.txt +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/builder/2024.10.txt +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/builder/2025.06.txt +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/builder/PREVIEW.txt +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/builder/README.md +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/builder/base-images.json +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/call_graph.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/__init__.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/_download.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/_traceback.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/app.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/cluster.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/config.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/container.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/entry_point.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/environment.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/import_refs.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/launch.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/network_file_system.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/profile.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/programs/__init__.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/programs/launch_instance_ssh.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/programs/run_jupyter.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/programs/run_marimo.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/programs/vscode.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/run.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/token.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cli/utils.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/client.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cloud_bucket_mount.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cloud_bucket_mount.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cls.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/cls.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/config.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/container_process.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/container_process.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/environments.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/environments.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/exception.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/experimental/__init__.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/experimental/flash.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/experimental/flash.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/experimental/ipython.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/file_io.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/file_io.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/file_pattern_matcher.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/functions.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/gpu.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/image.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/image.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/io_streams.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/io_streams.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/mount.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/mount.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/network_file_system.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/network_file_system.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/object.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/object.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/output.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/parallel_map.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/parallel_map.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/partial_function.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/partial_function.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/proxy.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/proxy.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/py.typed +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/retries.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/runner.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/runner.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/running_app.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/sandbox.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/sandbox.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/schedule.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/scheduler_placement.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/serving.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/serving.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/snapshot.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/snapshot.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/stream_type.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/token_flow.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal/token_flow.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal.egg-info/SOURCES.txt +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal.egg-info/dependency_links.txt +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal.egg-info/entry_points.txt +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal.egg-info/requires.txt +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal.egg-info/top_level.txt +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_docs/__init__.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_docs/gen_cli_docs.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_docs/gen_reference_docs.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_docs/mdmd/__init__.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_docs/mdmd/mdmd.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_docs/mdmd/signatures.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_proto/__init__.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_proto/api_grpc.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_proto/api_pb2_grpc.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_proto/api_pb2_grpc.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_proto/modal_api_grpc.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_proto/modal_options_grpc.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_proto/options.proto +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_proto/options_grpc.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_proto/options_pb2.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_proto/options_pb2.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_proto/options_pb2_grpc.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_proto/options_pb2_grpc.pyi +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_proto/py.typed +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/modal_version/__main__.py +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/pyproject.toml +0 -0
- {modal-1.1.2.dev14 → modal-1.1.2.dev16}/setup.cfg +0 -0
@@ -63,17 +63,21 @@ async def clear(name: str, *, yes: bool = YES_OPTION, env: Optional[str] = ENV_O
|
|
63
63
|
|
64
64
|
@dict_cli.command(name="delete", rich_help_panel="Management")
|
65
65
|
@synchronizer.create_blocking
|
66
|
-
async def delete(
|
66
|
+
async def delete(
|
67
|
+
name: str,
|
68
|
+
*,
|
69
|
+
allow_missing: bool = Option(False, "--allow-missing", help="Don't error if the Dict doesn't exist."),
|
70
|
+
yes: bool = YES_OPTION,
|
71
|
+
env: Optional[str] = ENV_OPTION,
|
72
|
+
):
|
67
73
|
"""Delete a named Dict and all of its data."""
|
68
|
-
# Lookup first to validate the name, even though delete is a staticmethod
|
69
|
-
await _Dict.from_name(name, environment_name=env).hydrate()
|
70
74
|
if not yes:
|
71
75
|
typer.confirm(
|
72
76
|
f"Are you sure you want to irrevocably delete the modal.Dict '{name}'?",
|
73
77
|
default=False,
|
74
78
|
abort=True,
|
75
79
|
)
|
76
|
-
await _Dict.delete(name, environment_name=env)
|
80
|
+
await _Dict.objects.delete(name, environment_name=env, allow_missing=allow_missing)
|
77
81
|
|
78
82
|
|
79
83
|
@dict_cli.command(name="get", rich_help_panel="Inspection")
|
@@ -45,17 +45,22 @@ async def create(name: str, *, env: Optional[str] = ENV_OPTION):
|
|
45
45
|
|
46
46
|
@queue_cli.command(name="delete", rich_help_panel="Management")
|
47
47
|
@synchronizer.create_blocking
|
48
|
-
async def delete(
|
48
|
+
async def delete(
|
49
|
+
name: str,
|
50
|
+
*,
|
51
|
+
allow_missing: bool = Option(False, "--allow-missing", help="Don't error if the Queue doesn't exist."),
|
52
|
+
yes: bool = YES_OPTION,
|
53
|
+
env: Optional[str] = ENV_OPTION,
|
54
|
+
):
|
49
55
|
"""Delete a named Queue and all of its data."""
|
50
|
-
|
51
|
-
await _Queue.from_name(name, environment_name=env).hydrate()
|
56
|
+
env = ensure_env(env)
|
52
57
|
if not yes:
|
53
58
|
typer.confirm(
|
54
59
|
f"Are you sure you want to irrevocably delete the modal.Queue '{name}'?",
|
55
60
|
default=False,
|
56
61
|
abort=True,
|
57
62
|
)
|
58
|
-
await _Queue.delete(name, environment_name=env)
|
63
|
+
await _Queue.objects.delete(name, environment_name=env, allow_missing=allow_missing)
|
59
64
|
|
60
65
|
|
61
66
|
@queue_cli.command(name="list", rich_help_panel="Management")
|
@@ -11,7 +11,7 @@ from typing import Optional
|
|
11
11
|
import click
|
12
12
|
import typer
|
13
13
|
from rich.syntax import Syntax
|
14
|
-
from typer import Argument
|
14
|
+
from typer import Argument, Option
|
15
15
|
|
16
16
|
from modal._output import make_console
|
17
17
|
from modal._utils.async_utils import synchronizer
|
@@ -158,26 +158,23 @@ def some_function():
|
|
158
158
|
console.print(Syntax(example_code, "python"))
|
159
159
|
|
160
160
|
|
161
|
-
@secret_cli.command("delete", help="Delete a named
|
161
|
+
@secret_cli.command("delete", help="Delete a named Secret.")
|
162
162
|
@synchronizer.create_blocking
|
163
163
|
async def delete(
|
164
|
-
|
164
|
+
name: str = Argument(help="Name of the modal.Secret to be deleted. Case sensitive"),
|
165
|
+
*,
|
166
|
+
allow_missing: bool = Option(False, "--allow-missing", help="Don't error if the Secret doesn't exist."),
|
165
167
|
yes: bool = YES_OPTION,
|
166
168
|
env: Optional[str] = ENV_OPTION,
|
167
169
|
):
|
168
|
-
"""TODO"""
|
169
170
|
env = ensure_env(env)
|
170
|
-
secret = await _Secret.from_name(secret_name, environment_name=env).hydrate()
|
171
171
|
if not yes:
|
172
172
|
typer.confirm(
|
173
|
-
f"Are you sure you want to irrevocably delete the modal.Secret '{
|
173
|
+
f"Are you sure you want to irrevocably delete the modal.Secret '{name}'?",
|
174
174
|
default=False,
|
175
175
|
abort=True,
|
176
176
|
)
|
177
|
-
|
178
|
-
|
179
|
-
# TODO: replace with API on `modal.Secret` when we add it
|
180
|
-
await client.stub.SecretDelete(api_pb2.SecretDeleteRequest(secret_id=secret.object_id))
|
177
|
+
await _Secret.objects.delete(name, environment_name=env, allow_missing=allow_missing)
|
181
178
|
|
182
179
|
|
183
180
|
def get_text_from_editor(key) -> str:
|
@@ -274,25 +274,26 @@ async def cp(
|
|
274
274
|
|
275
275
|
@volume_cli.command(
|
276
276
|
name="delete",
|
277
|
-
help="Delete a named
|
277
|
+
help="Delete a named Volume and all of its data.",
|
278
278
|
rich_help_panel="Management",
|
279
279
|
)
|
280
280
|
@synchronizer.create_blocking
|
281
281
|
async def delete(
|
282
|
-
|
282
|
+
name: str = Argument(help="Name of the modal.Volume to be deleted. Case sensitive"),
|
283
|
+
*,
|
284
|
+
allow_missing: bool = Option(False, "--allow-missing", help="Don't error if the Volume doesn't exist."),
|
283
285
|
yes: bool = YES_OPTION,
|
284
286
|
env: Optional[str] = ENV_OPTION,
|
285
287
|
):
|
286
|
-
|
287
|
-
await _Volume.from_name(volume_name, environment_name=env).hydrate()
|
288
|
+
env = ensure_env(env)
|
288
289
|
if not yes:
|
289
290
|
typer.confirm(
|
290
|
-
f"Are you sure you want to irrevocably delete the modal.Volume '{
|
291
|
+
f"Are you sure you want to irrevocably delete the modal.Volume '{name}'?",
|
291
292
|
default=False,
|
292
293
|
abort=True,
|
293
294
|
)
|
294
295
|
|
295
|
-
await _Volume.delete(
|
296
|
+
await _Volume.objects.delete(name, environment_name=env, allow_missing=allow_missing)
|
296
297
|
|
297
298
|
|
298
299
|
@volume_cli.command(
|
@@ -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.dev16",
|
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.dev16",
|
168
168
|
):
|
169
169
|
"""mdmd:hidden
|
170
170
|
The Modal client object is not intended to be instantiated directly by users.
|
@@ -27,7 +27,7 @@ from ._utils.name_utils import check_object_name
|
|
27
27
|
from ._utils.time_utils import as_timestamp, timestamp_to_localized_dt
|
28
28
|
from .client import _Client
|
29
29
|
from .config import logger
|
30
|
-
from .exception import InvalidError, RequestSizeError
|
30
|
+
from .exception import InvalidError, NotFoundError, RequestSizeError
|
31
31
|
|
32
32
|
|
33
33
|
def _serialize_dict(data):
|
@@ -104,6 +104,40 @@ class _DictManager:
|
|
104
104
|
dicts = [_Dict._new_hydrated(item.dict_id, client, item.metadata, is_another_app=True) for item in items]
|
105
105
|
return dicts[:max_objects] if max_objects is not None else dicts
|
106
106
|
|
107
|
+
@staticmethod
|
108
|
+
async def delete(
|
109
|
+
name: str, # Name of the Dict to delete
|
110
|
+
*,
|
111
|
+
allow_missing: bool = False, # If True, don't raise an error if the Dict doesn't exist
|
112
|
+
environment_name: Optional[str] = None, # Uses active environment if not specified
|
113
|
+
client: Optional[_Client] = None, # Optional client with Modal credentials
|
114
|
+
):
|
115
|
+
"""Delete a named Dict.
|
116
|
+
|
117
|
+
Warning: This deletes an *entire Dict*, not just a specific key.
|
118
|
+
Deletion is irreversible and will affect any Apps currently using the Dict.
|
119
|
+
|
120
|
+
**Examples:**
|
121
|
+
|
122
|
+
```python notest
|
123
|
+
await modal.Dict.objects.delete("my-dict")
|
124
|
+
```
|
125
|
+
|
126
|
+
Dicts will be deleted from the active environment, or another one can be specified:
|
127
|
+
|
128
|
+
```python notest
|
129
|
+
await modal.Dict.objects.delete("my-dict", environment_name="dev")
|
130
|
+
```
|
131
|
+
"""
|
132
|
+
try:
|
133
|
+
obj = await _Dict.from_name(name, environment_name=environment_name).hydrate(client)
|
134
|
+
except NotFoundError:
|
135
|
+
if not allow_missing:
|
136
|
+
raise
|
137
|
+
else:
|
138
|
+
req = api_pb2.DictDeleteRequest(dict_id=obj.object_id)
|
139
|
+
await retry_transient_errors(obj._client.stub.DictDelete, req)
|
140
|
+
|
107
141
|
|
108
142
|
DictManager = synchronize_api(_DictManager)
|
109
143
|
|
@@ -311,9 +345,18 @@ class _Dict(_Object, type_prefix="di"):
|
|
311
345
|
client: Optional[_Client] = None,
|
312
346
|
environment_name: Optional[str] = None,
|
313
347
|
):
|
314
|
-
|
315
|
-
|
316
|
-
|
348
|
+
"""mdmd:hidden
|
349
|
+
Delete a named Dict object.
|
350
|
+
|
351
|
+
Warning: This deletes an *entire Dict*, not just a specific key.
|
352
|
+
Deletion is irreversible and will affect any Apps currently using the Dict.
|
353
|
+
|
354
|
+
DEPRECATED: This method is deprecated; we recommend using `modal.Dict.objects.delete` instead.
|
355
|
+
"""
|
356
|
+
deprecation_warning(
|
357
|
+
(2025, 8, 6), "`modal.Dict.delete` is deprecated; we recommend using `modal.Dict.objects.delete` instead."
|
358
|
+
)
|
359
|
+
await _Dict.objects.delete(name, environment_name=environment_name, client=client)
|
317
360
|
|
318
361
|
@live_method
|
319
362
|
async def info(self) -> DictInfo:
|
@@ -67,6 +67,33 @@ class _DictManager:
|
|
67
67
|
"""
|
68
68
|
...
|
69
69
|
|
70
|
+
@staticmethod
|
71
|
+
async def delete(
|
72
|
+
name: str,
|
73
|
+
*,
|
74
|
+
allow_missing: bool = False,
|
75
|
+
environment_name: typing.Optional[str] = None,
|
76
|
+
client: typing.Optional[modal.client._Client] = None,
|
77
|
+
):
|
78
|
+
"""Delete a named Dict.
|
79
|
+
|
80
|
+
Warning: This deletes an *entire Dict*, not just a specific key.
|
81
|
+
Deletion is irreversible and will affect any Apps currently using the Dict.
|
82
|
+
|
83
|
+
**Examples:**
|
84
|
+
|
85
|
+
```python notest
|
86
|
+
await modal.Dict.objects.delete("my-dict")
|
87
|
+
```
|
88
|
+
|
89
|
+
Dicts will be deleted from the active environment, or another one can be specified:
|
90
|
+
|
91
|
+
```python notest
|
92
|
+
await modal.Dict.objects.delete("my-dict", environment_name="dev")
|
93
|
+
```
|
94
|
+
"""
|
95
|
+
...
|
96
|
+
|
70
97
|
class DictManager:
|
71
98
|
"""Namespace with methods for managing named Dict objects."""
|
72
99
|
def __init__(self, /, *args, **kwargs):
|
@@ -142,6 +169,65 @@ class DictManager:
|
|
142
169
|
|
143
170
|
list: __list_spec
|
144
171
|
|
172
|
+
class __delete_spec(typing_extensions.Protocol):
|
173
|
+
def __call__(
|
174
|
+
self,
|
175
|
+
/,
|
176
|
+
name: str,
|
177
|
+
*,
|
178
|
+
allow_missing: bool = False,
|
179
|
+
environment_name: typing.Optional[str] = None,
|
180
|
+
client: typing.Optional[modal.client.Client] = None,
|
181
|
+
):
|
182
|
+
"""Delete a named Dict.
|
183
|
+
|
184
|
+
Warning: This deletes an *entire Dict*, not just a specific key.
|
185
|
+
Deletion is irreversible and will affect any Apps currently using the Dict.
|
186
|
+
|
187
|
+
**Examples:**
|
188
|
+
|
189
|
+
```python notest
|
190
|
+
await modal.Dict.objects.delete("my-dict")
|
191
|
+
```
|
192
|
+
|
193
|
+
Dicts will be deleted from the active environment, or another one can be specified:
|
194
|
+
|
195
|
+
```python notest
|
196
|
+
await modal.Dict.objects.delete("my-dict", environment_name="dev")
|
197
|
+
```
|
198
|
+
"""
|
199
|
+
...
|
200
|
+
|
201
|
+
async def aio(
|
202
|
+
self,
|
203
|
+
/,
|
204
|
+
name: str,
|
205
|
+
*,
|
206
|
+
allow_missing: bool = False,
|
207
|
+
environment_name: typing.Optional[str] = None,
|
208
|
+
client: typing.Optional[modal.client.Client] = None,
|
209
|
+
):
|
210
|
+
"""Delete a named Dict.
|
211
|
+
|
212
|
+
Warning: This deletes an *entire Dict*, not just a specific key.
|
213
|
+
Deletion is irreversible and will affect any Apps currently using the Dict.
|
214
|
+
|
215
|
+
**Examples:**
|
216
|
+
|
217
|
+
```python notest
|
218
|
+
await modal.Dict.objects.delete("my-dict")
|
219
|
+
```
|
220
|
+
|
221
|
+
Dicts will be deleted from the active environment, or another one can be specified:
|
222
|
+
|
223
|
+
```python notest
|
224
|
+
await modal.Dict.objects.delete("my-dict", environment_name="dev")
|
225
|
+
```
|
226
|
+
"""
|
227
|
+
...
|
228
|
+
|
229
|
+
delete: __delete_spec
|
230
|
+
|
145
231
|
class _Dict(modal._object._Object):
|
146
232
|
"""Distributed dictionary for storage in Modal apps.
|
147
233
|
|
@@ -274,7 +360,17 @@ class _Dict(modal._object._Object):
|
|
274
360
|
*,
|
275
361
|
client: typing.Optional[modal.client._Client] = None,
|
276
362
|
environment_name: typing.Optional[str] = None,
|
277
|
-
):
|
363
|
+
):
|
364
|
+
"""mdmd:hidden
|
365
|
+
Delete a named Dict object.
|
366
|
+
|
367
|
+
Warning: This deletes an *entire Dict*, not just a specific key.
|
368
|
+
Deletion is irreversible and will affect any Apps currently using the Dict.
|
369
|
+
|
370
|
+
DEPRECATED: This method is deprecated; we recommend using `modal.Dict.objects.delete` instead.
|
371
|
+
"""
|
372
|
+
...
|
373
|
+
|
278
374
|
async def info(self) -> DictInfo:
|
279
375
|
"""Return information about the Dict object."""
|
280
376
|
...
|
@@ -534,7 +630,17 @@ class Dict(modal.object.Object):
|
|
534
630
|
*,
|
535
631
|
client: typing.Optional[modal.client.Client] = None,
|
536
632
|
environment_name: typing.Optional[str] = None,
|
537
|
-
):
|
633
|
+
):
|
634
|
+
"""mdmd:hidden
|
635
|
+
Delete a named Dict object.
|
636
|
+
|
637
|
+
Warning: This deletes an *entire Dict*, not just a specific key.
|
638
|
+
Deletion is irreversible and will affect any Apps currently using the Dict.
|
639
|
+
|
640
|
+
DEPRECATED: This method is deprecated; we recommend using `modal.Dict.objects.delete` instead.
|
641
|
+
"""
|
642
|
+
...
|
643
|
+
|
538
644
|
async def aio(
|
539
645
|
self,
|
540
646
|
/,
|
@@ -542,7 +648,16 @@ class Dict(modal.object.Object):
|
|
542
648
|
*,
|
543
649
|
client: typing.Optional[modal.client.Client] = None,
|
544
650
|
environment_name: typing.Optional[str] = None,
|
545
|
-
):
|
651
|
+
):
|
652
|
+
"""mdmd:hidden
|
653
|
+
Delete a named Dict object.
|
654
|
+
|
655
|
+
Warning: This deletes an *entire Dict*, not just a specific key.
|
656
|
+
Deletion is irreversible and will affect any Apps currently using the Dict.
|
657
|
+
|
658
|
+
DEPRECATED: This method is deprecated; we recommend using `modal.Dict.objects.delete` instead.
|
659
|
+
"""
|
660
|
+
...
|
546
661
|
|
547
662
|
delete: __delete_spec
|
548
663
|
|
@@ -433,7 +433,7 @@ class Function(
|
|
433
433
|
|
434
434
|
_call_generator: ___call_generator_spec[typing_extensions.Self]
|
435
435
|
|
436
|
-
class __remote_spec(typing_extensions.Protocol[
|
436
|
+
class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
437
437
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER:
|
438
438
|
"""Calls the function remotely, executing it with the given arguments and returning the execution's result."""
|
439
439
|
...
|
@@ -442,7 +442,7 @@ class Function(
|
|
442
442
|
"""Calls the function remotely, executing it with the given arguments and returning the execution's result."""
|
443
443
|
...
|
444
444
|
|
445
|
-
remote: __remote_spec[modal._functions.
|
445
|
+
remote: __remote_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
|
446
446
|
|
447
447
|
class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
448
448
|
def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]:
|
@@ -469,7 +469,7 @@ class Function(
|
|
469
469
|
"""
|
470
470
|
...
|
471
471
|
|
472
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
472
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
473
473
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
474
474
|
"""[Experimental] Calls the function with the given arguments, without waiting for the results.
|
475
475
|
|
@@ -493,7 +493,7 @@ class Function(
|
|
493
493
|
...
|
494
494
|
|
495
495
|
_experimental_spawn: ___experimental_spawn_spec[
|
496
|
-
modal._functions.
|
496
|
+
modal._functions.ReturnType, modal._functions.P, typing_extensions.Self
|
497
497
|
]
|
498
498
|
|
499
499
|
class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER, SUPERSELF]):
|
@@ -502,7 +502,7 @@ class Function(
|
|
502
502
|
|
503
503
|
_spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P, typing_extensions.Self]
|
504
504
|
|
505
|
-
class __spawn_spec(typing_extensions.Protocol[
|
505
|
+
class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
506
506
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
507
507
|
"""Calls the function with the given arguments, without waiting for the results.
|
508
508
|
|
@@ -523,7 +523,7 @@ class Function(
|
|
523
523
|
"""
|
524
524
|
...
|
525
525
|
|
526
|
-
spawn: __spawn_spec[modal._functions.
|
526
|
+
spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
|
527
527
|
|
528
528
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]:
|
529
529
|
"""Return the inner Python object wrapped by this Modal Function."""
|
@@ -29,7 +29,7 @@ from ._utils.grpc_utils import retry_transient_errors
|
|
29
29
|
from ._utils.name_utils import check_object_name
|
30
30
|
from ._utils.time_utils import as_timestamp, timestamp_to_localized_dt
|
31
31
|
from .client import _Client
|
32
|
-
from .exception import InvalidError, RequestSizeError
|
32
|
+
from .exception import InvalidError, NotFoundError, RequestSizeError
|
33
33
|
|
34
34
|
|
35
35
|
@dataclass
|
@@ -102,6 +102,40 @@ class _QueueManager:
|
|
102
102
|
queues = [_Queue._new_hydrated(item.queue_id, client, item.metadata, is_another_app=True) for item in items]
|
103
103
|
return queues[:max_objects] if max_objects is not None else queues
|
104
104
|
|
105
|
+
@staticmethod
|
106
|
+
async def delete(
|
107
|
+
name: str, # Name of the Queue to delete
|
108
|
+
*,
|
109
|
+
allow_missing: bool = False, # If True, don't raise an error if the Queue doesn't exist
|
110
|
+
environment_name: Optional[str] = None, # Uses active environment if not specified
|
111
|
+
client: Optional[_Client] = None, # Optional client with Modal credentials
|
112
|
+
):
|
113
|
+
"""Delete a named Queue.
|
114
|
+
|
115
|
+
Warning: This deletes an *entire Queue*, not just a specific entry or partition.
|
116
|
+
Deletion is irreversible and will affect any Apps currently using the Queue.
|
117
|
+
|
118
|
+
**Examples:**
|
119
|
+
|
120
|
+
```python notest
|
121
|
+
await modal.Queue.objects.delete("my-queue")
|
122
|
+
```
|
123
|
+
|
124
|
+
Queues will be deleted from the active environment, or another one can be specified:
|
125
|
+
|
126
|
+
```python notest
|
127
|
+
await modal.Queue.objects.delete("my-queue", environment_name="dev")
|
128
|
+
```
|
129
|
+
"""
|
130
|
+
try:
|
131
|
+
obj = await _Queue.from_name(name, environment_name=environment_name).hydrate(client)
|
132
|
+
except NotFoundError:
|
133
|
+
if not allow_missing:
|
134
|
+
raise
|
135
|
+
else:
|
136
|
+
req = api_pb2.QueueDeleteRequest(queue_id=obj.object_id)
|
137
|
+
await retry_transient_errors(obj._client.stub.QueueDelete, req)
|
138
|
+
|
105
139
|
|
106
140
|
QueueManager = synchronize_api(_QueueManager)
|
107
141
|
|
@@ -323,9 +357,20 @@ class _Queue(_Object, type_prefix="qu"):
|
|
323
357
|
|
324
358
|
@staticmethod
|
325
359
|
async def delete(name: str, *, client: Optional[_Client] = None, environment_name: Optional[str] = None):
|
326
|
-
|
327
|
-
|
328
|
-
|
360
|
+
"""mdmd:hidden
|
361
|
+
Delete a named Queue.
|
362
|
+
|
363
|
+
Warning: This deletes an *entire Queue*, not just a specific entry or partition.
|
364
|
+
Deletion is irreversible and will affect any Apps currently using the Queue.
|
365
|
+
|
366
|
+
DEPRECATED: This method is deprecated; we recommend using `modal.Queue.objects.delete` instead.
|
367
|
+
|
368
|
+
"""
|
369
|
+
deprecation_warning(
|
370
|
+
(2025, 8, 6),
|
371
|
+
"`modal.Queue.delete` is deprecated; we recommend using `modal.Queue.objects.delete` instead.",
|
372
|
+
)
|
373
|
+
await _Queue.objects.delete(name, environment_name=environment_name, client=client)
|
329
374
|
|
330
375
|
@live_method
|
331
376
|
async def info(self) -> QueueInfo:
|
@@ -65,6 +65,33 @@ class _QueueManager:
|
|
65
65
|
"""
|
66
66
|
...
|
67
67
|
|
68
|
+
@staticmethod
|
69
|
+
async def delete(
|
70
|
+
name: str,
|
71
|
+
*,
|
72
|
+
allow_missing: bool = False,
|
73
|
+
environment_name: typing.Optional[str] = None,
|
74
|
+
client: typing.Optional[modal.client._Client] = None,
|
75
|
+
):
|
76
|
+
"""Delete a named Queue.
|
77
|
+
|
78
|
+
Warning: This deletes an *entire Queue*, not just a specific entry or partition.
|
79
|
+
Deletion is irreversible and will affect any Apps currently using the Queue.
|
80
|
+
|
81
|
+
**Examples:**
|
82
|
+
|
83
|
+
```python notest
|
84
|
+
await modal.Queue.objects.delete("my-queue")
|
85
|
+
```
|
86
|
+
|
87
|
+
Queues will be deleted from the active environment, or another one can be specified:
|
88
|
+
|
89
|
+
```python notest
|
90
|
+
await modal.Queue.objects.delete("my-queue", environment_name="dev")
|
91
|
+
```
|
92
|
+
"""
|
93
|
+
...
|
94
|
+
|
68
95
|
class QueueManager:
|
69
96
|
"""Namespace with methods for managing named Queue objects."""
|
70
97
|
def __init__(self, /, *args, **kwargs):
|
@@ -140,6 +167,65 @@ class QueueManager:
|
|
140
167
|
|
141
168
|
list: __list_spec
|
142
169
|
|
170
|
+
class __delete_spec(typing_extensions.Protocol):
|
171
|
+
def __call__(
|
172
|
+
self,
|
173
|
+
/,
|
174
|
+
name: str,
|
175
|
+
*,
|
176
|
+
allow_missing: bool = False,
|
177
|
+
environment_name: typing.Optional[str] = None,
|
178
|
+
client: typing.Optional[modal.client.Client] = None,
|
179
|
+
):
|
180
|
+
"""Delete a named Queue.
|
181
|
+
|
182
|
+
Warning: This deletes an *entire Queue*, not just a specific entry or partition.
|
183
|
+
Deletion is irreversible and will affect any Apps currently using the Queue.
|
184
|
+
|
185
|
+
**Examples:**
|
186
|
+
|
187
|
+
```python notest
|
188
|
+
await modal.Queue.objects.delete("my-queue")
|
189
|
+
```
|
190
|
+
|
191
|
+
Queues will be deleted from the active environment, or another one can be specified:
|
192
|
+
|
193
|
+
```python notest
|
194
|
+
await modal.Queue.objects.delete("my-queue", environment_name="dev")
|
195
|
+
```
|
196
|
+
"""
|
197
|
+
...
|
198
|
+
|
199
|
+
async def aio(
|
200
|
+
self,
|
201
|
+
/,
|
202
|
+
name: str,
|
203
|
+
*,
|
204
|
+
allow_missing: bool = False,
|
205
|
+
environment_name: typing.Optional[str] = None,
|
206
|
+
client: typing.Optional[modal.client.Client] = None,
|
207
|
+
):
|
208
|
+
"""Delete a named Queue.
|
209
|
+
|
210
|
+
Warning: This deletes an *entire Queue*, not just a specific entry or partition.
|
211
|
+
Deletion is irreversible and will affect any Apps currently using the Queue.
|
212
|
+
|
213
|
+
**Examples:**
|
214
|
+
|
215
|
+
```python notest
|
216
|
+
await modal.Queue.objects.delete("my-queue")
|
217
|
+
```
|
218
|
+
|
219
|
+
Queues will be deleted from the active environment, or another one can be specified:
|
220
|
+
|
221
|
+
```python notest
|
222
|
+
await modal.Queue.objects.delete("my-queue", environment_name="dev")
|
223
|
+
```
|
224
|
+
"""
|
225
|
+
...
|
226
|
+
|
227
|
+
delete: __delete_spec
|
228
|
+
|
143
229
|
class _Queue(modal._object._Object):
|
144
230
|
"""Distributed, FIFO queue for data flow in Modal apps.
|
145
231
|
|
@@ -297,7 +383,17 @@ class _Queue(modal._object._Object):
|
|
297
383
|
*,
|
298
384
|
client: typing.Optional[modal.client._Client] = None,
|
299
385
|
environment_name: typing.Optional[str] = None,
|
300
|
-
):
|
386
|
+
):
|
387
|
+
"""mdmd:hidden
|
388
|
+
Delete a named Queue.
|
389
|
+
|
390
|
+
Warning: This deletes an *entire Queue*, not just a specific entry or partition.
|
391
|
+
Deletion is irreversible and will affect any Apps currently using the Queue.
|
392
|
+
|
393
|
+
DEPRECATED: This method is deprecated; we recommend using `modal.Queue.objects.delete` instead.
|
394
|
+
"""
|
395
|
+
...
|
396
|
+
|
301
397
|
async def info(self) -> QueueInfo:
|
302
398
|
"""Return information about the Queue object."""
|
303
399
|
...
|
@@ -597,7 +693,17 @@ class Queue(modal.object.Object):
|
|
597
693
|
*,
|
598
694
|
client: typing.Optional[modal.client.Client] = None,
|
599
695
|
environment_name: typing.Optional[str] = None,
|
600
|
-
):
|
696
|
+
):
|
697
|
+
"""mdmd:hidden
|
698
|
+
Delete a named Queue.
|
699
|
+
|
700
|
+
Warning: This deletes an *entire Queue*, not just a specific entry or partition.
|
701
|
+
Deletion is irreversible and will affect any Apps currently using the Queue.
|
702
|
+
|
703
|
+
DEPRECATED: This method is deprecated; we recommend using `modal.Queue.objects.delete` instead.
|
704
|
+
"""
|
705
|
+
...
|
706
|
+
|
601
707
|
async def aio(
|
602
708
|
self,
|
603
709
|
/,
|
@@ -605,7 +711,16 @@ class Queue(modal.object.Object):
|
|
605
711
|
*,
|
606
712
|
client: typing.Optional[modal.client.Client] = None,
|
607
713
|
environment_name: typing.Optional[str] = None,
|
608
|
-
):
|
714
|
+
):
|
715
|
+
"""mdmd:hidden
|
716
|
+
Delete a named Queue.
|
717
|
+
|
718
|
+
Warning: This deletes an *entire Queue*, not just a specific entry or partition.
|
719
|
+
Deletion is irreversible and will affect any Apps currently using the Queue.
|
720
|
+
|
721
|
+
DEPRECATED: This method is deprecated; we recommend using `modal.Queue.objects.delete` instead.
|
722
|
+
"""
|
723
|
+
...
|
609
724
|
|
610
725
|
delete: __delete_spec
|
611
726
|
|