modal 1.2.2.dev32__tar.gz → 1.2.2.dev33__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.2.2.dev32 → modal-1.2.2.dev33}/PKG-INFO +1 -1
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/client.pyi +2 -2
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/functions.pyi +6 -6
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/secret.py +32 -31
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/secret.pyi +9 -2
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal.egg-info/PKG-INFO +1 -1
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_version/__init__.py +1 -1
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/LICENSE +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/README.md +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/__init__.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/__main__.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_billing.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_clustered_functions.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_clustered_functions.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_container_entrypoint.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_functions.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_grpc_client.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_ipython.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_load_context.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_location.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_object.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_output.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_partial_function.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_pty.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_resolver.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_resources.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_runtime/__init__.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_runtime/asgi.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_runtime/container_io_manager.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_runtime/container_io_manager.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_runtime/execution_context.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_runtime/execution_context.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_runtime/gpu_memory_snapshot.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_runtime/telemetry.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_runtime/user_code_imports.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_serialization.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_traceback.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_tunnel.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_tunnel.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_type_manager.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/__init__.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/app_utils.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/async_utils.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/auth_token_manager.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/blob_utils.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/bytes_io_segment_payload.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/deprecation.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/docker_utils.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/function_utils.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/git_utils.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/grpc_testing.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/grpc_utils.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/hash_utils.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/http_utils.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/jwt_utils.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/logger.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/mount_utils.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/name_utils.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/package_utils.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/pattern_utils.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/rand_pb_testing.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/shell_utils.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/task_command_router_client.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_utils/time_utils.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_vendor/__init__.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_vendor/a2wsgi_wsgi.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_vendor/cloudpickle.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_vendor/tblib.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/_watcher.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/app.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/app.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/billing.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/builder/2023.12.312.txt +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/builder/2023.12.txt +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/builder/2024.04.txt +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/builder/2024.10.txt +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/builder/2025.06.txt +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/builder/PREVIEW.txt +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/builder/README.md +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/builder/base-images.json +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/call_graph.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/__init__.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/_download.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/_traceback.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/app.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/cluster.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/config.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/container.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/dict.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/entry_point.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/environment.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/import_refs.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/launch.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/network_file_system.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/profile.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/programs/__init__.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/programs/launch_instance_ssh.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/programs/run_jupyter.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/programs/run_marimo.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/programs/vscode.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/queues.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/run.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/secret.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/token.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/utils.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cli/volume.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/client.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cloud_bucket_mount.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cloud_bucket_mount.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cls.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/cls.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/config.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/container_process.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/container_process.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/dict.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/dict.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/environments.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/environments.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/exception.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/experimental/__init__.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/experimental/flash.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/experimental/flash.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/experimental/ipython.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/file_io.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/file_io.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/file_pattern_matcher.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/functions.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/gpu.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/image.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/image.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/io_streams.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/io_streams.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/mount.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/mount.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/network_file_system.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/network_file_system.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/object.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/object.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/output.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/parallel_map.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/parallel_map.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/partial_function.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/partial_function.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/proxy.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/proxy.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/py.typed +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/queue.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/queue.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/retries.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/runner.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/runner.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/running_app.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/sandbox.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/sandbox.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/schedule.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/scheduler_placement.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/serving.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/serving.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/snapshot.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/snapshot.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/stream_type.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/token_flow.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/token_flow.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/volume.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal/volume.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal.egg-info/SOURCES.txt +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal.egg-info/dependency_links.txt +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal.egg-info/entry_points.txt +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal.egg-info/requires.txt +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal.egg-info/top_level.txt +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_docs/__init__.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_docs/gen_cli_docs.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_docs/gen_reference_docs.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_docs/mdmd/__init__.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_docs/mdmd/mdmd.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_docs/mdmd/signatures.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/__init__.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/api.proto +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/api_grpc.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/api_pb2.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/api_pb2.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/api_pb2_grpc.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/api_pb2_grpc.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/modal_api_grpc.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/py.typed +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/sandbox_router.proto +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/sandbox_router_grpc.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/sandbox_router_pb2.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/sandbox_router_pb2.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/sandbox_router_pb2_grpc.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/sandbox_router_pb2_grpc.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/task_command_router.proto +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/task_command_router_grpc.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/task_command_router_pb2.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/task_command_router_pb2.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/task_command_router_pb2_grpc.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_proto/task_command_router_pb2_grpc.pyi +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/modal_version/__main__.py +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/pyproject.toml +0 -0
- {modal-1.2.2.dev32 → modal-1.2.2.dev33}/setup.cfg +0 -0
|
@@ -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.2.2.
|
|
36
|
+
version: str = "1.2.2.dev33",
|
|
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.2.2.
|
|
167
|
+
version: str = "1.2.2.dev33",
|
|
168
168
|
):
|
|
169
169
|
"""mdmd:hidden
|
|
170
170
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -408,7 +408,7 @@ class Function(
|
|
|
408
408
|
|
|
409
409
|
_call_generator: ___call_generator_spec[typing_extensions.Self]
|
|
410
410
|
|
|
411
|
-
class __remote_spec(typing_extensions.Protocol[
|
|
411
|
+
class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
|
412
412
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER:
|
|
413
413
|
"""Calls the function remotely, executing it with the given arguments and returning the execution's result."""
|
|
414
414
|
...
|
|
@@ -417,7 +417,7 @@ class Function(
|
|
|
417
417
|
"""Calls the function remotely, executing it with the given arguments and returning the execution's result."""
|
|
418
418
|
...
|
|
419
419
|
|
|
420
|
-
remote: __remote_spec[modal._functions.
|
|
420
|
+
remote: __remote_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
|
|
421
421
|
|
|
422
422
|
class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
|
423
423
|
def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]:
|
|
@@ -444,7 +444,7 @@ class Function(
|
|
|
444
444
|
"""
|
|
445
445
|
...
|
|
446
446
|
|
|
447
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
|
447
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
|
448
448
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
|
449
449
|
"""[Experimental] Calls the function with the given arguments, without waiting for the results.
|
|
450
450
|
|
|
@@ -468,7 +468,7 @@ class Function(
|
|
|
468
468
|
...
|
|
469
469
|
|
|
470
470
|
_experimental_spawn: ___experimental_spawn_spec[
|
|
471
|
-
modal._functions.
|
|
471
|
+
modal._functions.ReturnType, modal._functions.P, typing_extensions.Self
|
|
472
472
|
]
|
|
473
473
|
|
|
474
474
|
class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER, SUPERSELF]):
|
|
@@ -477,7 +477,7 @@ class Function(
|
|
|
477
477
|
|
|
478
478
|
_spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P, typing_extensions.Self]
|
|
479
479
|
|
|
480
|
-
class __spawn_spec(typing_extensions.Protocol[
|
|
480
|
+
class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
|
481
481
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
|
482
482
|
"""Calls the function with the given arguments, without waiting for the results.
|
|
483
483
|
|
|
@@ -498,7 +498,7 @@ class Function(
|
|
|
498
498
|
"""
|
|
499
499
|
...
|
|
500
500
|
|
|
501
|
-
spawn: __spawn_spec[modal._functions.
|
|
501
|
+
spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
|
|
502
502
|
|
|
503
503
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]:
|
|
504
504
|
"""Return the inner Python object wrapped by this Modal Function."""
|
|
@@ -206,6 +206,33 @@ class _SecretManager:
|
|
|
206
206
|
SecretManager = synchronize_api(_SecretManager)
|
|
207
207
|
|
|
208
208
|
|
|
209
|
+
async def _load_from_env_dict(instance: "_Secret", load_context: LoadContext, env_dict: dict[str, str]):
|
|
210
|
+
"""helper method for loaders .from_dict and .from_dotenv etc."""
|
|
211
|
+
if load_context.app_id is not None:
|
|
212
|
+
req = api_pb2.SecretGetOrCreateRequest(
|
|
213
|
+
object_creation_type=api_pb2.OBJECT_CREATION_TYPE_ANONYMOUS_OWNED_BY_APP,
|
|
214
|
+
env_dict=env_dict,
|
|
215
|
+
app_id=load_context.app_id,
|
|
216
|
+
environment_name=load_context.environment_name,
|
|
217
|
+
)
|
|
218
|
+
else:
|
|
219
|
+
req = api_pb2.SecretGetOrCreateRequest(
|
|
220
|
+
object_creation_type=api_pb2.OBJECT_CREATION_TYPE_EPHEMERAL,
|
|
221
|
+
env_dict=env_dict,
|
|
222
|
+
environment_name=load_context.environment_name,
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
try:
|
|
226
|
+
resp = await load_context.client.stub.SecretGetOrCreate(req)
|
|
227
|
+
except GRPCError as exc:
|
|
228
|
+
if exc.status == Status.INVALID_ARGUMENT:
|
|
229
|
+
raise InvalidError(exc.message)
|
|
230
|
+
if exc.status == Status.FAILED_PRECONDITION:
|
|
231
|
+
raise InvalidError(exc.message)
|
|
232
|
+
raise
|
|
233
|
+
instance._hydrate(resp.secret_id, load_context.client, resp.metadata)
|
|
234
|
+
|
|
235
|
+
|
|
209
236
|
class _Secret(_Object, type_prefix="st"):
|
|
210
237
|
"""Secrets provide a dictionary of environment variables for images.
|
|
211
238
|
|
|
@@ -263,26 +290,7 @@ class _Secret(_Object, type_prefix="st"):
|
|
|
263
290
|
async def _load(
|
|
264
291
|
self: _Secret, resolver: Resolver, load_context: LoadContext, existing_object_id: Optional[str]
|
|
265
292
|
):
|
|
266
|
-
|
|
267
|
-
object_creation_type = api_pb2.OBJECT_CREATION_TYPE_ANONYMOUS_OWNED_BY_APP
|
|
268
|
-
else:
|
|
269
|
-
object_creation_type = api_pb2.OBJECT_CREATION_TYPE_EPHEMERAL
|
|
270
|
-
|
|
271
|
-
req = api_pb2.SecretGetOrCreateRequest(
|
|
272
|
-
object_creation_type=object_creation_type,
|
|
273
|
-
env_dict=env_dict_filtered,
|
|
274
|
-
app_id=load_context.app_id,
|
|
275
|
-
environment_name=load_context.environment_name,
|
|
276
|
-
)
|
|
277
|
-
try:
|
|
278
|
-
resp = await load_context.client.stub.SecretGetOrCreate(req)
|
|
279
|
-
except GRPCError as exc:
|
|
280
|
-
if exc.status == Status.INVALID_ARGUMENT:
|
|
281
|
-
raise InvalidError(exc.message)
|
|
282
|
-
if exc.status == Status.FAILED_PRECONDITION:
|
|
283
|
-
raise InvalidError(exc.message)
|
|
284
|
-
raise
|
|
285
|
-
self._hydrate(resp.secret_id, load_context.client, resp.metadata)
|
|
293
|
+
await _load_from_env_dict(self, load_context, env_dict_filtered)
|
|
286
294
|
|
|
287
295
|
rep = f"Secret.from_dict([{', '.join(env_dict.keys())}])"
|
|
288
296
|
# TODO: scoping - these should probably not be lazily hydrated without having an app and/or sandbox association
|
|
@@ -306,7 +314,7 @@ class _Secret(_Object, type_prefix="st"):
|
|
|
306
314
|
return _Secret.from_dict({})
|
|
307
315
|
|
|
308
316
|
@staticmethod
|
|
309
|
-
def from_dotenv(path=None, *, filename=".env") -> "_Secret":
|
|
317
|
+
def from_dotenv(path=None, *, filename=".env", client: Optional[_Client] = None) -> "_Secret":
|
|
310
318
|
"""Create secrets from a .env file automatically.
|
|
311
319
|
|
|
312
320
|
If no argument is provided, it will use the current working directory as the starting
|
|
@@ -360,19 +368,12 @@ class _Secret(_Object, type_prefix="st"):
|
|
|
360
368
|
# To simplify this, we just support the cwd and don't do any automatic path inference.
|
|
361
369
|
dotenv_path = find_dotenv(filename, usecwd=True)
|
|
362
370
|
|
|
363
|
-
env_dict = dotenv_values(dotenv_path)
|
|
364
|
-
|
|
365
|
-
req = api_pb2.SecretGetOrCreateRequest(
|
|
366
|
-
object_creation_type=api_pb2.OBJECT_CREATION_TYPE_ANONYMOUS_OWNED_BY_APP,
|
|
367
|
-
env_dict=env_dict,
|
|
368
|
-
app_id=load_context.app_id, # TODO: what if app_id isn't set here (e.g. .hydrate())
|
|
369
|
-
)
|
|
370
|
-
resp = await load_context.client.stub.SecretGetOrCreate(req)
|
|
371
|
+
env_dict = {k: v or "" for k, v in dotenv_values(dotenv_path).items()}
|
|
371
372
|
|
|
372
|
-
self
|
|
373
|
+
await _load_from_env_dict(self, load_context, env_dict)
|
|
373
374
|
|
|
374
375
|
return _Secret._from_loader(
|
|
375
|
-
_load, "Secret.from_dotenv()", hydrate_lazily=True, load_context_overrides=LoadContext
|
|
376
|
+
_load, "Secret.from_dotenv()", hydrate_lazily=True, load_context_overrides=LoadContext(client=client)
|
|
376
377
|
)
|
|
377
378
|
|
|
378
379
|
@staticmethod
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
import google.protobuf.message
|
|
3
|
+
import modal._load_context
|
|
3
4
|
import modal._object
|
|
4
5
|
import modal.client
|
|
5
6
|
import modal.object
|
|
@@ -355,6 +356,12 @@ class SecretManager:
|
|
|
355
356
|
|
|
356
357
|
delete: __delete_spec
|
|
357
358
|
|
|
359
|
+
async def _load_from_env_dict(
|
|
360
|
+
instance: _Secret, load_context: modal._load_context.LoadContext, env_dict: dict[str, str]
|
|
361
|
+
):
|
|
362
|
+
"""helper method for loaders .from_dict and .from_dotenv etc."""
|
|
363
|
+
...
|
|
364
|
+
|
|
358
365
|
class _Secret(modal._object._Object):
|
|
359
366
|
"""Secrets provide a dictionary of environment variables for images.
|
|
360
367
|
|
|
@@ -392,7 +399,7 @@ class _Secret(modal._object._Object):
|
|
|
392
399
|
...
|
|
393
400
|
|
|
394
401
|
@staticmethod
|
|
395
|
-
def from_dotenv(path=None, *, filename=".env") -> _Secret:
|
|
402
|
+
def from_dotenv(path=None, *, filename=".env", client: typing.Optional[modal.client._Client] = None) -> _Secret:
|
|
396
403
|
"""Create secrets from a .env file automatically.
|
|
397
404
|
|
|
398
405
|
If no argument is provided, it will use the current working directory as the starting
|
|
@@ -517,7 +524,7 @@ class Secret(modal.object.Object):
|
|
|
517
524
|
...
|
|
518
525
|
|
|
519
526
|
@staticmethod
|
|
520
|
-
def from_dotenv(path=None, *, filename=".env") -> Secret:
|
|
527
|
+
def from_dotenv(path=None, *, filename=".env", client: typing.Optional[modal.client.Client] = None) -> Secret:
|
|
521
528
|
"""Create secrets from a .env file automatically.
|
|
522
529
|
|
|
523
530
|
If no argument is provided, it will use the current working directory as the starting
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|