modal 1.5.1.dev8__tar.gz → 1.5.1.dev10__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.5.1.dev8 → modal-1.5.1.dev10}/PKG-INFO +3 -3
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/README.md +1 -1
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_billing.py +2 -2
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_environments.py +3 -2
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_functions.py +4 -4
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_image.py +36 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_partial_function.py +1 -1
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_server.py +2 -2
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/task_command_router_client.py +27 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_workspace.py +3 -2
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/app.py +6 -3
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/app.pyi +10 -6
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/billing.pyi +2 -2
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/_help.py +3 -3
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/billing.py +1 -1
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/changelog.py +1 -1
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/config.py +1 -1
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/environment.py +2 -1
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/shell.py +1 -1
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/client.py +1 -1
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/client.pyi +2 -2
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cls.py +2 -2
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cls.pyi +4 -4
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/exception.py +1 -1
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/functions.pyi +8 -8
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/partial_function.pyi +1 -1
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/runner.py +16 -12
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/sandbox.py +93 -26
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/sandbox.pyi +78 -15
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/schedule.py +1 -1
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/server.pyi +2 -2
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal.egg-info/PKG-INFO +3 -3
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal.egg-info/requires.txt +1 -1
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_docs/gen_cli_docs.py +48 -2
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_proto/api_grpc.py +128 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_proto/api_pb2.py +970 -837
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_proto/api_pb2.pyi +219 -5
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_proto/api_pb2_grpc.py +265 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_proto/api_pb2_grpc.pyi +82 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_proto/modal_api_grpc.py +8 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_version/__init__.py +1 -1
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/pyproject.toml +24 -11
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/LICENSE +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/__init__.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/__main__.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_clustered_functions.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_clustered_functions.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_container_entrypoint.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_function_variants.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_grpc_client.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_ipython.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_load_context.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_location.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_logs.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_object.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_output/__init__.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_output/manager.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_output/pty.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_output/rich.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_output/status.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_resolver.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_resources.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_runtime/__init__.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_runtime/asgi.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_runtime/container_io_manager.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_runtime/container_io_manager.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_runtime/execution_context.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_runtime/execution_context.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_runtime/gpu_memory_snapshot.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_runtime/task_lifecycle_manager.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_runtime/task_lifecycle_manager.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_runtime/telemetry.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_runtime/user_code_event_loop.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_runtime/user_code_imports.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_serialization.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_traceback.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_tunnel.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_tunnel.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_type_manager.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/__init__.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/app_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/async_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/auth_token_manager.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/blob_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/browser_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/bytes_io_segment_payload.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/deprecation.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/docker_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/function_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/git_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/grpc_testing.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/grpc_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/hash_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/http_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/jwt_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/logger.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/mount_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/name_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/package_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/pattern_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/rand_pb_testing.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/sandbox_fs_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/shell_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_utils/time_utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_vendor/__init__.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_vendor/a2wsgi_wsgi.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_vendor/cloudpickle.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_vendor/tblib.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_vendor/version.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/_watcher.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/billing.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/builder/2023.12.312.txt +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/builder/2023.12.txt +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/builder/2024.04.txt +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/builder/2024.10.txt +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/builder/2025.06.txt +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/builder/PREVIEW.txt +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/builder/README.md +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/builder/base-images.json +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/call_graph.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/__init__.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/_download.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/_traceback.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/app.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/bootstrap.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/cluster.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/container.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/dashboard.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/dict.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/entry_point.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/image.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/import_refs.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/launch.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/logo.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/network_file_system.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/profile.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/programs/__init__.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/programs/run_jupyter.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/programs/vscode.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/queues.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/run.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/secret.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/selector.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/skills.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/token.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/utils.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cli/volume.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cloud_bucket_mount.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/cloud_bucket_mount.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/config.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/container_process.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/container_process.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/dict.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/dict.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/environments.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/environments.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/experimental/__init__.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/experimental/flash.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/experimental/flash.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/experimental/ipython.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/file_io.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/file_io.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/file_pattern_matcher.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/functions.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/image.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/image.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/io_streams.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/io_streams.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/mount.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/mount.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/network_file_system.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/network_file_system.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/object.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/object.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/output.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/parallel_map.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/parallel_map.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/partial_function.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/proxy.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/proxy.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/py.typed +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/queue.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/queue.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/retries.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/runner.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/running_app.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/sandbox_fs.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/sandbox_fs.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/scheduler_placement.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/secret.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/secret.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/server.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/serving.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/serving.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/skills/modal/SKILL.md +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/snapshot.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/snapshot.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/stream_type.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/token_flow.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/token_flow.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/volume.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/volume.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/workspace.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal/workspace.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal.egg-info/SOURCES.txt +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal.egg-info/dependency_links.txt +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal.egg-info/entry_points.txt +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal.egg-info/top_level.txt +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_docs/__init__.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_docs/gen_cli_docs_main.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_docs/gen_reference_docs.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_docs/gen_reference_docs_main.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_docs/mdmd/__init__.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_docs/mdmd/mdmd.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_docs/mdmd/signatures.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_docs/mdmd/types.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_proto/__init__.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_proto/py.typed +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_proto/task_command_router_grpc.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_proto/task_command_router_pb2.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_proto/task_command_router_pb2.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_proto/task_command_router_pb2_grpc.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_proto/task_command_router_pb2_grpc.pyi +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/modal_version/__main__.py +0 -0
- {modal-1.5.1.dev8 → modal-1.5.1.dev10}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: modal
|
|
3
|
-
Version: 1.5.1.
|
|
3
|
+
Version: 1.5.1.dev10
|
|
4
4
|
Summary: Python client library for Modal
|
|
5
5
|
Author-email: Modal Labs <support@modal.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -23,7 +23,7 @@ Requires-Dist: grpclib<0.4.10,>=0.4.7; python_version < "3.14"
|
|
|
23
23
|
Requires-Dist: grpclib<0.4.10,>=0.4.9; python_version >= "3.14"
|
|
24
24
|
Requires-Dist: protobuf!=4.24.0,<7.0,>=3.19
|
|
25
25
|
Requires-Dist: rich>=12.0.0
|
|
26
|
-
Requires-Dist: synchronicity~=0.12.
|
|
26
|
+
Requires-Dist: synchronicity~=0.12.5
|
|
27
27
|
Requires-Dist: toml
|
|
28
28
|
Requires-Dist: types-certifi
|
|
29
29
|
Requires-Dist: types-toml
|
|
@@ -45,7 +45,7 @@ access to serverless cloud compute from Python scripts on your local computer.
|
|
|
45
45
|
See the [online documentation](https://modal.com/docs/guide) for many
|
|
46
46
|
[example applications](https://modal.com/docs/examples),
|
|
47
47
|
a [user guide](https://modal.com/docs/guide), and the detailed
|
|
48
|
-
[API reference](https://modal.com/docs/
|
|
48
|
+
[API reference](https://modal.com/docs/sdk/py/latest).
|
|
49
49
|
|
|
50
50
|
## Installation
|
|
51
51
|
|
|
@@ -12,7 +12,7 @@ access to serverless cloud compute from Python scripts on your local computer.
|
|
|
12
12
|
See the [online documentation](https://modal.com/docs/guide) for many
|
|
13
13
|
[example applications](https://modal.com/docs/examples),
|
|
14
14
|
a [user guide](https://modal.com/docs/guide), and the detailed
|
|
15
|
-
[API reference](https://modal.com/docs/
|
|
15
|
+
[API reference](https://modal.com/docs/sdk/py/latest).
|
|
16
16
|
|
|
17
17
|
## Installation
|
|
18
18
|
|
|
@@ -80,7 +80,7 @@ class BillingReportItem:
|
|
|
80
80
|
environment_name=pb_item.environment_name,
|
|
81
81
|
interval_start=pb_item.interval.ToDatetime().replace(tzinfo=timezone.utc),
|
|
82
82
|
cost=Decimal(pb_item.cost),
|
|
83
|
-
cost_by_resource={k: Decimal(
|
|
83
|
+
cost_by_resource={k: Decimal(v) for k, v in pb_item.cost_by_resource.items()},
|
|
84
84
|
tags=dict(pb_item.tags),
|
|
85
85
|
)
|
|
86
86
|
|
|
@@ -120,7 +120,7 @@ async def _workspace_billing_report(
|
|
|
120
120
|
case, we recommend leaving a buffer after the end of the query interval.
|
|
121
121
|
|
|
122
122
|
It's also possible to generate reports using the
|
|
123
|
-
[`modal billing report`](https://modal.com/docs/
|
|
123
|
+
[`modal billing report`](https://modal.com/docs/cli/latest/billing) CLI command. The CLI
|
|
124
124
|
has a few convenience features for generating reports across relative time ranges.
|
|
125
125
|
|
|
126
126
|
"""
|
|
@@ -428,8 +428,9 @@ class _EnvironmentBillingManager:
|
|
|
428
428
|
Modal's billing model evolves.
|
|
429
429
|
|
|
430
430
|
It's also possible to generate reports using the
|
|
431
|
-
[`modal environment billing report`](https://modal.com/docs/
|
|
432
|
-
The CLI has a few convenience features for generating
|
|
431
|
+
[`modal environment billing report`](https://modal.com/docs/cli/latest/environment#modal-environment-billing-report)
|
|
432
|
+
CLI command. The CLI has a few convenience features for generating
|
|
433
|
+
reports across relative time ranges.
|
|
433
434
|
|
|
434
435
|
"""
|
|
435
436
|
+ BILLING_DOCSTRING
|
|
@@ -1912,9 +1912,9 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
|
1912
1912
|
**kwargs: Keyword arguments forwarded to the remote function.
|
|
1913
1913
|
|
|
1914
1914
|
Returns:
|
|
1915
|
-
A [`modal.FunctionCall`](https://modal.com/docs/
|
|
1915
|
+
A [`modal.FunctionCall`](https://modal.com/docs/sdk/py/latest/modal.FunctionCall) object
|
|
1916
1916
|
that can later be polled or waited for using
|
|
1917
|
-
[`.get(timeout=...)`](https://modal.com/docs/
|
|
1917
|
+
[`.get(timeout=...)`](https://modal.com/docs/sdk/py/latest/modal.FunctionCall#get).
|
|
1918
1918
|
"""
|
|
1919
1919
|
self._check_no_web_url("spawn")
|
|
1920
1920
|
if self._is_generator:
|
|
@@ -2065,7 +2065,7 @@ class _FunctionCall(typing.Generic[ReturnType], _Object, type_prefix="fc"):
|
|
|
2065
2065
|
"""Returns a structure representing the call graph from a given root
|
|
2066
2066
|
call ID, along with the status of execution for each node.
|
|
2067
2067
|
|
|
2068
|
-
See [`modal.call_graph`](https://modal.com/docs/
|
|
2068
|
+
See [`modal.call_graph`](https://modal.com/docs/sdk/py/latest/modal.call_graph) reference page
|
|
2069
2069
|
for documentation on the structure of the returned `InputInfo` items.
|
|
2070
2070
|
|
|
2071
2071
|
Returns:
|
|
@@ -2083,7 +2083,7 @@ class _FunctionCall(typing.Generic[ReturnType], _Object, type_prefix="fc"):
|
|
|
2083
2083
|
terminate_containers: bool = False,
|
|
2084
2084
|
):
|
|
2085
2085
|
"""Cancels the function call, which will stop its execution and mark its inputs as
|
|
2086
|
-
[`TERMINATED`](https://modal.com/docs/
|
|
2086
|
+
[`TERMINATED`](https://modal.com/docs/sdk/py/latest/modal.call_graph#modalcall_graphinputstatus).
|
|
2087
2087
|
|
|
2088
2088
|
If `terminate_containers=True` - the containers running the cancelled inputs are all terminated
|
|
2089
2089
|
causing any non-cancelled inputs on those containers to be rescheduled in new containers.
|
|
@@ -9,6 +9,7 @@ import typing
|
|
|
9
9
|
import warnings
|
|
10
10
|
from collections.abc import Callable, Collection, Sequence
|
|
11
11
|
from dataclasses import dataclass, field
|
|
12
|
+
from functools import wraps
|
|
12
13
|
from inspect import isfunction
|
|
13
14
|
from pathlib import Path, PurePosixPath
|
|
14
15
|
from typing import (
|
|
@@ -424,6 +425,20 @@ async def _image_await_build_result(image_id: str, client: _Client) -> api_pb2.I
|
|
|
424
425
|
return result_response
|
|
425
426
|
|
|
426
427
|
|
|
428
|
+
def _requires_image_instance(method):
|
|
429
|
+
@wraps(method)
|
|
430
|
+
def wrapper(self, *args, **kwargs):
|
|
431
|
+
if not isinstance(self, _Image):
|
|
432
|
+
raise InvalidError(
|
|
433
|
+
"Image has not been constructed yet. "
|
|
434
|
+
f"Use one of the static factory methods prior to calling {method.__name__} "
|
|
435
|
+
"like `modal.Image.debian_slim`, `modal.Image.from_registry`, or `modal.Image.micromamba`"
|
|
436
|
+
)
|
|
437
|
+
return method(self, *args, **kwargs)
|
|
438
|
+
|
|
439
|
+
return wrapper
|
|
440
|
+
|
|
441
|
+
|
|
427
442
|
class _Image(_Object, type_prefix="im"):
|
|
428
443
|
"""Base class for container images to run functions in.
|
|
429
444
|
|
|
@@ -755,6 +770,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
755
770
|
context_mount_function=lambda: mount,
|
|
756
771
|
)
|
|
757
772
|
|
|
773
|
+
@_requires_image_instance
|
|
758
774
|
def add_local_file(self, local_path: str | Path, remote_path: str, *, copy: bool = False) -> "_Image":
|
|
759
775
|
"""Adds a local file to the image at `remote_path` within the container.
|
|
760
776
|
|
|
@@ -791,6 +807,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
791
807
|
mount = _Mount._from_local_file(local_path, remote_path)
|
|
792
808
|
return self._add_mount_layer_or_copy(mount, copy=copy)
|
|
793
809
|
|
|
810
|
+
@_requires_image_instance
|
|
794
811
|
def add_local_dir(
|
|
795
812
|
self,
|
|
796
813
|
local_path: str | Path,
|
|
@@ -869,6 +886,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
869
886
|
mount = _Mount._add_local_dir(Path(local_path), PurePosixPath(remote_path), ignore=_ignore_fn(ignore))
|
|
870
887
|
return self._add_mount_layer_or_copy(mount, copy=copy)
|
|
871
888
|
|
|
889
|
+
@_requires_image_instance
|
|
872
890
|
def add_local_python_source(
|
|
873
891
|
self, *modules: str, copy: bool = False, ignore: Sequence[str] | Callable[[Path], bool] = NON_PYTHON_FILES
|
|
874
892
|
) -> "_Image":
|
|
@@ -1012,6 +1030,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
1012
1030
|
await resolver.load(self, load_context)
|
|
1013
1031
|
return self
|
|
1014
1032
|
|
|
1033
|
+
@_requires_image_instance
|
|
1015
1034
|
def pip_install(
|
|
1016
1035
|
self,
|
|
1017
1036
|
*packages: str | list[str],
|
|
@@ -1098,6 +1117,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
1098
1117
|
secrets=secrets,
|
|
1099
1118
|
)
|
|
1100
1119
|
|
|
1120
|
+
@_requires_image_instance
|
|
1101
1121
|
def pip_install_private_repos(
|
|
1102
1122
|
self,
|
|
1103
1123
|
*repositories: str,
|
|
@@ -1218,6 +1238,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
1218
1238
|
force_build=self.force_build or force_build,
|
|
1219
1239
|
)
|
|
1220
1240
|
|
|
1241
|
+
@_requires_image_instance
|
|
1221
1242
|
def pip_install_from_requirements(
|
|
1222
1243
|
self,
|
|
1223
1244
|
requirements_txt: str,
|
|
@@ -1279,6 +1300,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
1279
1300
|
secrets=secrets,
|
|
1280
1301
|
)
|
|
1281
1302
|
|
|
1303
|
+
@_requires_image_instance
|
|
1282
1304
|
def pip_install_from_pyproject(
|
|
1283
1305
|
self,
|
|
1284
1306
|
pyproject_toml: str,
|
|
@@ -1362,6 +1384,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
1362
1384
|
gpu_config=parse_gpu_config(gpu),
|
|
1363
1385
|
)
|
|
1364
1386
|
|
|
1387
|
+
@_requires_image_instance
|
|
1365
1388
|
def uv_pip_install(
|
|
1366
1389
|
self,
|
|
1367
1390
|
*packages: str | list[str],
|
|
@@ -1493,6 +1516,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
1493
1516
|
secrets=secrets,
|
|
1494
1517
|
)
|
|
1495
1518
|
|
|
1519
|
+
@_requires_image_instance
|
|
1496
1520
|
def poetry_install_from_file(
|
|
1497
1521
|
self,
|
|
1498
1522
|
poetry_pyproject_toml: str,
|
|
@@ -1602,6 +1626,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
1602
1626
|
gpu_config=parse_gpu_config(gpu),
|
|
1603
1627
|
)
|
|
1604
1628
|
|
|
1629
|
+
@_requires_image_instance
|
|
1605
1630
|
def uv_sync(
|
|
1606
1631
|
self,
|
|
1607
1632
|
uv_project_dir: str = "./",
|
|
@@ -1785,6 +1810,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
1785
1810
|
gpu_config=parse_gpu_config(gpu),
|
|
1786
1811
|
)
|
|
1787
1812
|
|
|
1813
|
+
@_requires_image_instance
|
|
1788
1814
|
def dockerfile_commands(
|
|
1789
1815
|
self,
|
|
1790
1816
|
*dockerfile_commands: str | list[str],
|
|
@@ -1873,6 +1899,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
1873
1899
|
build_args=build_args,
|
|
1874
1900
|
)
|
|
1875
1901
|
|
|
1902
|
+
@_requires_image_instance
|
|
1876
1903
|
def entrypoint(
|
|
1877
1904
|
self,
|
|
1878
1905
|
entrypoint_commands: list[str],
|
|
@@ -1893,6 +1920,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
1893
1920
|
|
|
1894
1921
|
return self.dockerfile_commands(dockerfile_cmd)
|
|
1895
1922
|
|
|
1923
|
+
@_requires_image_instance
|
|
1896
1924
|
def shell(
|
|
1897
1925
|
self,
|
|
1898
1926
|
shell_commands: list[str],
|
|
@@ -1913,6 +1941,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
1913
1941
|
|
|
1914
1942
|
return self.dockerfile_commands(dockerfile_cmd)
|
|
1915
1943
|
|
|
1944
|
+
@_requires_image_instance
|
|
1916
1945
|
def run_commands(
|
|
1917
1946
|
self,
|
|
1918
1947
|
*commands: str | list[str],
|
|
@@ -1997,6 +2026,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
1997
2026
|
_namespace=api_pb2.DEPLOYMENT_NAMESPACE_GLOBAL,
|
|
1998
2027
|
)
|
|
1999
2028
|
|
|
2029
|
+
@_requires_image_instance
|
|
2000
2030
|
def micromamba_install(
|
|
2001
2031
|
self,
|
|
2002
2032
|
*packages: str | list[str],
|
|
@@ -2528,6 +2558,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
2528
2558
|
_namespace=api_pb2.DEPLOYMENT_NAMESPACE_GLOBAL,
|
|
2529
2559
|
)
|
|
2530
2560
|
|
|
2561
|
+
@_requires_image_instance
|
|
2531
2562
|
def apt_install(
|
|
2532
2563
|
self,
|
|
2533
2564
|
*packages: str | list[str],
|
|
@@ -2579,6 +2610,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
2579
2610
|
secrets=secrets,
|
|
2580
2611
|
)
|
|
2581
2612
|
|
|
2613
|
+
@_requires_image_instance
|
|
2582
2614
|
def run_function(
|
|
2583
2615
|
self,
|
|
2584
2616
|
raw_f: Callable[..., Any],
|
|
@@ -2697,6 +2729,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
2697
2729
|
force_build=self.force_build or force_build,
|
|
2698
2730
|
)
|
|
2699
2731
|
|
|
2732
|
+
@_requires_image_instance
|
|
2700
2733
|
def env(self, vars: dict[str, str]) -> "_Image":
|
|
2701
2734
|
"""Sets the environment variables in an Image.
|
|
2702
2735
|
|
|
@@ -2727,6 +2760,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
2727
2760
|
dockerfile_function=build_dockerfile,
|
|
2728
2761
|
)
|
|
2729
2762
|
|
|
2763
|
+
@_requires_image_instance
|
|
2730
2764
|
def workdir(self, path: str | PurePosixPath) -> "_Image":
|
|
2731
2765
|
"""Set the working directory for subsequent image build steps and function execution.
|
|
2732
2766
|
|
|
@@ -2756,6 +2790,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
2756
2790
|
dockerfile_function=build_dockerfile,
|
|
2757
2791
|
)
|
|
2758
2792
|
|
|
2793
|
+
@_requires_image_instance
|
|
2759
2794
|
def cmd(self, cmd: list[str]) -> "_Image":
|
|
2760
2795
|
"""Set the default command (`CMD`) to run when a container is started.
|
|
2761
2796
|
|
|
@@ -2784,6 +2819,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
2784
2819
|
|
|
2785
2820
|
return self.dockerfile_commands(dockerfile_cmd)
|
|
2786
2821
|
|
|
2822
|
+
@_requires_image_instance
|
|
2787
2823
|
def pipe(
|
|
2788
2824
|
self,
|
|
2789
2825
|
func: Callable[Concatenate["modal.Image", P], "modal.Image"],
|
|
@@ -477,7 +477,7 @@ def _wsgi_app(
|
|
|
477
477
|
Web Server Gateway Interface (WSGI) is a standard for synchronous Python web apps.
|
|
478
478
|
It has been [succeeded by the ASGI interface](https://asgi.readthedocs.io/en/latest/introduction.html#wsgi-compatibility)
|
|
479
479
|
which is compatible with ASGI and supports additional functionality such as web sockets.
|
|
480
|
-
Modal supports ASGI via [`asgi_app`](https://modal.com/docs/
|
|
480
|
+
Modal supports ASGI via [`asgi_app`](https://modal.com/docs/sdk/py/latest/modal.asgi_app).
|
|
481
481
|
|
|
482
482
|
Examples:
|
|
483
483
|
```python
|
|
@@ -49,10 +49,10 @@ class _Server:
|
|
|
49
49
|
See [lifecycle hooks](https://modal.com/docs/guide/lifecycle-functions) for more information.
|
|
50
50
|
|
|
51
51
|
Generally, you will not construct a Server directly.
|
|
52
|
-
Instead, use the [`@app.server()`](https://modal.com/docs/
|
|
52
|
+
Instead, use the [`@app.server()`](https://modal.com/docs/sdk/py/latest/modal.App#server) decorator.
|
|
53
53
|
|
|
54
54
|
```python notest
|
|
55
|
-
@app.server(port=
|
|
55
|
+
@app.server(port=8080, routing_region="us-east")
|
|
56
56
|
class MyServer:
|
|
57
57
|
@modal.enter()
|
|
58
58
|
def start_server(self):
|
|
@@ -491,6 +491,27 @@ class TaskCommandRouterClient:
|
|
|
491
491
|
lambda: self._call_with_auth_retry(self._stub.SandboxStdinWriteV2, request)
|
|
492
492
|
)
|
|
493
493
|
|
|
494
|
+
async def sandbox_wait_until_ready(self, task_id: str, timeout: float) -> sr_pb2.SandboxWaitUntilReadyTcrResponse:
|
|
495
|
+
"""Wait until the sandbox's readiness probe reports ready.
|
|
496
|
+
|
|
497
|
+
Args:
|
|
498
|
+
task_id: The task ID hosting the sandbox.
|
|
499
|
+
timeout: Maximum time in seconds for the worker to wait.
|
|
500
|
+
Raises:
|
|
501
|
+
TimeoutError: If the sandbox does not become ready within `timeout`.
|
|
502
|
+
"""
|
|
503
|
+
request = sr_pb2.SandboxWaitUntilReadyTcrRequest(task_id=task_id, timeout=timeout)
|
|
504
|
+
with grpc_error_converter():
|
|
505
|
+
try:
|
|
506
|
+
return await asyncio.wait_for(
|
|
507
|
+
call_with_retries_on_transient_errors(
|
|
508
|
+
lambda: self._call_with_auth_retry(self._stub.SandboxWaitUntilReady, request, timeout=timeout),
|
|
509
|
+
),
|
|
510
|
+
timeout=timeout,
|
|
511
|
+
)
|
|
512
|
+
except asyncio.TimeoutError:
|
|
513
|
+
raise ModalTimeoutError("Timeout expired")
|
|
514
|
+
|
|
494
515
|
async def exec_poll(self, task_id: str, exec_id: str, deadline: float | None = None) -> sr_pb2.TaskExecPollResponse:
|
|
495
516
|
"""Poll for the exit status of an exec'd command, properly retrying on transient errors.
|
|
496
517
|
|
|
@@ -784,6 +805,12 @@ class TaskCommandRouterClient:
|
|
|
784
805
|
lambda: self._call_with_auth_retry(self._stub.TaskUnmountDirectory, request)
|
|
785
806
|
)
|
|
786
807
|
|
|
808
|
+
async def set_network_access(self, request: sr_pb2.TaskSetNetworkAccessRequest):
|
|
809
|
+
with grpc_error_converter():
|
|
810
|
+
return await call_with_retries_on_transient_errors(
|
|
811
|
+
lambda: self._call_with_auth_retry(self._stub.TaskSetNetworkAccess, request)
|
|
812
|
+
)
|
|
813
|
+
|
|
787
814
|
async def _snapshot_with_deadline(self, rpc, request, *, timeout: float, **kwargs):
|
|
788
815
|
# helper method for snapshot_directory and snapshot_filesystem to handle grpc
|
|
789
816
|
# deadlines in a consistent way, converting any error to TimeoutError after passing
|
|
@@ -151,8 +151,9 @@ class _WorkspaceBillingManager:
|
|
|
151
151
|
Modal's billing model evolves.
|
|
152
152
|
|
|
153
153
|
It's also possible to generate reports using the
|
|
154
|
-
[`modal billing report`](https://modal.com/docs/
|
|
155
|
-
has a few convenience features for generating reports across relative
|
|
154
|
+
[`modal billing report`](https://modal.com/docs/cli/latest/billing#modal-billing-report)
|
|
155
|
+
CLI command. The CLI has a few convenience features for generating reports across relative
|
|
156
|
+
time ranges.
|
|
156
157
|
|
|
157
158
|
"""
|
|
158
159
|
+ BILLING_DOCSTRING
|
|
@@ -710,7 +710,7 @@ class _App:
|
|
|
710
710
|
Modal functions can also be used as CLI entrypoints, but unlike `local_entrypoint`,
|
|
711
711
|
those functions are executed remotely directly.
|
|
712
712
|
|
|
713
|
-
Note that an explicit [`app.run()`](https://modal.com/docs/
|
|
713
|
+
Note that an explicit [`app.run()`](https://modal.com/docs/sdk/py/latest/modal.App#run) is not needed, as an
|
|
714
714
|
[app](https://modal.com/docs/guide/apps) is automatically created for you.
|
|
715
715
|
|
|
716
716
|
Args:
|
|
@@ -1066,7 +1066,7 @@ class _App:
|
|
|
1066
1066
|
max_inputs: int | None = None,
|
|
1067
1067
|
) -> Callable[[CLS_T | _PartialFunction], CLS_T]:
|
|
1068
1068
|
"""
|
|
1069
|
-
Decorator to register a new Modal [Cls](https://modal.com/docs/
|
|
1069
|
+
Decorator to register a new Modal [Cls](https://modal.com/docs/sdk/py/latest/modal.Cls) with this App.
|
|
1070
1070
|
|
|
1071
1071
|
Args:
|
|
1072
1072
|
image: The image to run as the container for the class service.
|
|
@@ -1290,6 +1290,7 @@ class _App:
|
|
|
1290
1290
|
scaleup_window: int | None = None, # Stabilization window (seconds) of sustained demand before scaling up
|
|
1291
1291
|
scaledown_window: int | None = None, # Max idle time before scaling down (seconds)
|
|
1292
1292
|
proxy: _Proxy | None = None, # Modal Proxy to use in front of this server
|
|
1293
|
+
unauthenticated: bool = False, # Whether the endpoint requires proxy authentication, required by default.
|
|
1293
1294
|
port: int = 8000, # Port the HTTP server listens on
|
|
1294
1295
|
startup_timeout: int = 30, # Maximum startup time in seconds
|
|
1295
1296
|
exit_grace_period: int = 0, # Grace period for in-flight requests on shutdown
|
|
@@ -1334,10 +1335,11 @@ class _App:
|
|
|
1334
1335
|
scaledown_window: Max idle time before scaling down (seconds).
|
|
1335
1336
|
proxy: Modal Proxy to use in front of this server.
|
|
1336
1337
|
port: Port the HTTP server listens on.
|
|
1338
|
+
unauthenticated: Whether the endpoint requires proxy authentication, required by default.
|
|
1337
1339
|
startup_timeout: Maximum startup time in seconds.
|
|
1338
1340
|
exit_grace_period: Grace period for in-flight requests on shutdown.
|
|
1339
1341
|
routing_region: Region to route Server requests through.
|
|
1340
|
-
h2_enabled: Enable HTTP/2
|
|
1342
|
+
h2_enabled: Enable HTTP/2.
|
|
1341
1343
|
target_concurrency: Target concurrency for the server; 0 disables autoscaling.
|
|
1342
1344
|
cloud: Cloud provider (aws, gcp, oci, auto).
|
|
1343
1345
|
region: Region(s) to run on.
|
|
@@ -1385,6 +1387,7 @@ class _App:
|
|
|
1385
1387
|
startup_timeout=startup_timeout,
|
|
1386
1388
|
exit_grace_period=exit_grace_period,
|
|
1387
1389
|
h2_enabled=h2_enabled,
|
|
1390
|
+
unauthenticated=unauthenticated,
|
|
1388
1391
|
)
|
|
1389
1392
|
|
|
1390
1393
|
# Build secrets list
|
|
@@ -494,7 +494,7 @@ class _App:
|
|
|
494
494
|
Modal functions can also be used as CLI entrypoints, but unlike `local_entrypoint`,
|
|
495
495
|
those functions are executed remotely directly.
|
|
496
496
|
|
|
497
|
-
Note that an explicit [`app.run()`](https://modal.com/docs/
|
|
497
|
+
Note that an explicit [`app.run()`](https://modal.com/docs/sdk/py/latest/modal.App#run) is not needed, as an
|
|
498
498
|
[app](https://modal.com/docs/guide/apps) is automatically created for you.
|
|
499
499
|
|
|
500
500
|
Args:
|
|
@@ -683,7 +683,7 @@ class _App:
|
|
|
683
683
|
_experimental_restrict_output: bool = False,
|
|
684
684
|
max_inputs: typing.Optional[int] = None,
|
|
685
685
|
) -> collections.abc.Callable[[typing.Union[CLS_T, modal._partial_function._PartialFunction]], CLS_T]:
|
|
686
|
-
"""Decorator to register a new Modal [Cls](https://modal.com/docs/
|
|
686
|
+
"""Decorator to register a new Modal [Cls](https://modal.com/docs/sdk/py/latest/modal.Cls) with this App.
|
|
687
687
|
|
|
688
688
|
Args:
|
|
689
689
|
image: The image to run as the container for the class service.
|
|
@@ -751,6 +751,7 @@ class _App:
|
|
|
751
751
|
scaleup_window: typing.Optional[int] = None,
|
|
752
752
|
scaledown_window: typing.Optional[int] = None,
|
|
753
753
|
proxy: typing.Optional[modal.proxy._Proxy] = None,
|
|
754
|
+
unauthenticated: bool = False,
|
|
754
755
|
port: int = 8000,
|
|
755
756
|
startup_timeout: int = 30,
|
|
756
757
|
exit_grace_period: int = 0,
|
|
@@ -795,10 +796,11 @@ class _App:
|
|
|
795
796
|
scaledown_window: Max idle time before scaling down (seconds).
|
|
796
797
|
proxy: Modal Proxy to use in front of this server.
|
|
797
798
|
port: Port the HTTP server listens on.
|
|
799
|
+
unauthenticated: Whether the endpoint requires proxy authentication, required by default.
|
|
798
800
|
startup_timeout: Maximum startup time in seconds.
|
|
799
801
|
exit_grace_period: Grace period for in-flight requests on shutdown.
|
|
800
802
|
routing_region: Region to route Server requests through.
|
|
801
|
-
h2_enabled: Enable HTTP/2
|
|
803
|
+
h2_enabled: Enable HTTP/2.
|
|
802
804
|
target_concurrency: Target concurrency for the server; 0 disables autoscaling.
|
|
803
805
|
cloud: Cloud provider (aws, gcp, oci, auto).
|
|
804
806
|
region: Region(s) to run on.
|
|
@@ -1495,7 +1497,7 @@ class App:
|
|
|
1495
1497
|
Modal functions can also be used as CLI entrypoints, but unlike `local_entrypoint`,
|
|
1496
1498
|
those functions are executed remotely directly.
|
|
1497
1499
|
|
|
1498
|
-
Note that an explicit [`app.run()`](https://modal.com/docs/
|
|
1500
|
+
Note that an explicit [`app.run()`](https://modal.com/docs/sdk/py/latest/modal.App#run) is not needed, as an
|
|
1499
1501
|
[app](https://modal.com/docs/guide/apps) is automatically created for you.
|
|
1500
1502
|
|
|
1501
1503
|
Args:
|
|
@@ -1684,7 +1686,7 @@ class App:
|
|
|
1684
1686
|
_experimental_restrict_output: bool = False,
|
|
1685
1687
|
max_inputs: typing.Optional[int] = None,
|
|
1686
1688
|
) -> collections.abc.Callable[[typing.Union[CLS_T, modal.partial_function.PartialFunction]], CLS_T]:
|
|
1687
|
-
"""Decorator to register a new Modal [Cls](https://modal.com/docs/
|
|
1689
|
+
"""Decorator to register a new Modal [Cls](https://modal.com/docs/sdk/py/latest/modal.Cls) with this App.
|
|
1688
1690
|
|
|
1689
1691
|
Args:
|
|
1690
1692
|
image: The image to run as the container for the class service.
|
|
@@ -1752,6 +1754,7 @@ class App:
|
|
|
1752
1754
|
scaleup_window: typing.Optional[int] = None,
|
|
1753
1755
|
scaledown_window: typing.Optional[int] = None,
|
|
1754
1756
|
proxy: typing.Optional[modal.proxy.Proxy] = None,
|
|
1757
|
+
unauthenticated: bool = False,
|
|
1755
1758
|
port: int = 8000,
|
|
1756
1759
|
startup_timeout: int = 30,
|
|
1757
1760
|
exit_grace_period: int = 0,
|
|
@@ -1794,10 +1797,11 @@ class App:
|
|
|
1794
1797
|
scaledown_window: Max idle time before scaling down (seconds).
|
|
1795
1798
|
proxy: Modal Proxy to use in front of this server.
|
|
1796
1799
|
port: Port the HTTP server listens on.
|
|
1800
|
+
unauthenticated: Whether the endpoint requires proxy authentication, required by default.
|
|
1797
1801
|
startup_timeout: Maximum startup time in seconds.
|
|
1798
1802
|
exit_grace_period: Grace period for in-flight requests on shutdown.
|
|
1799
1803
|
routing_region: Region to route Server requests through.
|
|
1800
|
-
h2_enabled: Enable HTTP/2
|
|
1804
|
+
h2_enabled: Enable HTTP/2.
|
|
1801
1805
|
target_concurrency: Target concurrency for the server; 0 disables autoscaling.
|
|
1802
1806
|
cloud: Cloud provider (aws, gcp, oci, auto).
|
|
1803
1807
|
region: Region(s) to run on.
|
|
@@ -134,7 +134,7 @@ class __workspace_billing_report_spec(typing_extensions.Protocol):
|
|
|
134
134
|
case, we recommend leaving a buffer after the end of the query interval.
|
|
135
135
|
|
|
136
136
|
It's also possible to generate reports using the
|
|
137
|
-
[`modal billing report`](https://modal.com/docs/
|
|
137
|
+
[`modal billing report`](https://modal.com/docs/cli/latest/billing) CLI command. The CLI
|
|
138
138
|
has a few convenience features for generating reports across relative time ranges.
|
|
139
139
|
"""
|
|
140
140
|
...
|
|
@@ -176,7 +176,7 @@ class __workspace_billing_report_spec(typing_extensions.Protocol):
|
|
|
176
176
|
case, we recommend leaving a buffer after the end of the query interval.
|
|
177
177
|
|
|
178
178
|
It's also possible to generate reports using the
|
|
179
|
-
[`modal billing report`](https://modal.com/docs/
|
|
179
|
+
[`modal billing report`](https://modal.com/docs/cli/latest/billing) CLI command. The CLI
|
|
180
180
|
has a few convenience features for generating reports across relative time ranges.
|
|
181
181
|
"""
|
|
182
182
|
...
|
|
@@ -98,7 +98,7 @@ def _build_epilog(cmd: click.Command) -> RenderableType | None:
|
|
|
98
98
|
return Text(cmd.epilog)
|
|
99
99
|
|
|
100
100
|
|
|
101
|
-
def
|
|
101
|
+
def group_commands_by_panel(group: click.Group) -> dict[str, list[tuple[str, click.Command]]]:
|
|
102
102
|
"""Bucket visible subcommands, preserving registration order."""
|
|
103
103
|
panels: dict[str, list[tuple[str, click.Command]]] = {}
|
|
104
104
|
for name, sub in group.commands.items():
|
|
@@ -109,7 +109,7 @@ def _group_commands_by_panel(group: click.Group) -> dict[str, list[tuple[str, cl
|
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
def _build_commands(group: click.Group, available_width: int) -> RenderableType | None:
|
|
112
|
-
panels =
|
|
112
|
+
panels = group_commands_by_panel(group)
|
|
113
113
|
if not panels:
|
|
114
114
|
return None
|
|
115
115
|
|
|
@@ -229,7 +229,7 @@ class ModalGroup(click.Group):
|
|
|
229
229
|
def format_commands(self, ctx: click.Context, formatter: click.HelpFormatter) -> None:
|
|
230
230
|
# Replaces click's single flat "Commands:" section with one section per
|
|
231
231
|
# panel so the simple-style help output still preserves grouping.
|
|
232
|
-
for panel_name, items in
|
|
232
|
+
for panel_name, items in group_commands_by_panel(self).items():
|
|
233
233
|
rows = [(name, sub.get_short_help_str(limit=80)) for name, sub in items]
|
|
234
234
|
with formatter.section(panel_name):
|
|
235
235
|
formatter.write_dl(rows)
|
|
@@ -107,7 +107,7 @@ async def report(
|
|
|
107
107
|
or by requesting a date range using `--for` (e.g., `--for today`, `--for 'last month'`).
|
|
108
108
|
|
|
109
109
|
This command provides a CLI frontend for the
|
|
110
|
-
[`Workspace.billing.report`](https://modal.com/docs/
|
|
110
|
+
[`Workspace.billing.report`](https://modal.com/docs/sdk/py/latest/modal.Workspace#billingreport) API.
|
|
111
111
|
|
|
112
112
|
Note that, as with the API, the start date is inclusive and the end date is exclusive.
|
|
113
113
|
Data will be reported for full intervals only. Using `--for` is a convenient way to define a
|
|
@@ -14,7 +14,7 @@ config_cli = ModalGroup(
|
|
|
14
14
|
help="""
|
|
15
15
|
Manage client configuration for the current profile.
|
|
16
16
|
|
|
17
|
-
Refer to https://modal.com/docs/
|
|
17
|
+
Refer to https://modal.com/docs/sdk/py/latest/modal.config for a full explanation
|
|
18
18
|
of what these options mean, and how to set them.
|
|
19
19
|
""",
|
|
20
20
|
)
|
|
@@ -230,7 +230,8 @@ async def environment_billing(
|
|
|
230
230
|
or by requesting a date range using `--for` (e.g., `--for today`, `--for 'last month'`).
|
|
231
231
|
|
|
232
232
|
This command provides a CLI frontend for the
|
|
233
|
-
[`Environment.billing.report`](https://modal.com/docs/
|
|
233
|
+
[`Environment.billing.report`](https://modal.com/docs/sdk/py/latest/modal.Environment#billingreport)
|
|
234
|
+
API.
|
|
234
235
|
|
|
235
236
|
Note that, as with the API, the start date is inclusive and the end date is exclusive.
|
|
236
237
|
Data will be reported for full intervals only. Using `--for` is a convenient way to define a
|
|
@@ -358,7 +358,7 @@ def shell(
|
|
|
358
358
|
modal shell hello_world.py::my_function
|
|
359
359
|
```
|
|
360
360
|
|
|
361
|
-
Or, if you're using a [modal.Cls](https://modal.com/docs/
|
|
361
|
+
Or, if you're using a [modal.Cls](https://modal.com/docs/sdk/py/latest/modal.Cls)
|
|
362
362
|
you can refer to a `@modal.method` directly:
|
|
363
363
|
|
|
364
364
|
```
|
|
@@ -235,7 +235,7 @@ class _Client:
|
|
|
235
235
|
else:
|
|
236
236
|
raise AuthError(
|
|
237
237
|
"Token missing. Could not authenticate client."
|
|
238
|
-
" If you have token credentials, see modal.com/docs/
|
|
238
|
+
" If you have token credentials, see modal.com/docs/sdk/py/latest/modal.config for setup help."
|
|
239
239
|
" If you are a new user, register an account at modal.com, then run `modal token new`."
|
|
240
240
|
)
|
|
241
241
|
|
|
@@ -35,7 +35,7 @@ class _Client:
|
|
|
35
35
|
server_url: str,
|
|
36
36
|
client_type: int,
|
|
37
37
|
credentials: typing.Optional[tuple[str, str]],
|
|
38
|
-
version: str = "1.5.1.
|
|
38
|
+
version: str = "1.5.1.dev10",
|
|
39
39
|
):
|
|
40
40
|
"""mdmd:hidden
|
|
41
41
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -205,7 +205,7 @@ class Client:
|
|
|
205
205
|
server_url: str,
|
|
206
206
|
client_type: int,
|
|
207
207
|
credentials: typing.Optional[tuple[str, str]],
|
|
208
|
-
version: str = "1.5.1.
|
|
208
|
+
version: str = "1.5.1.dev10",
|
|
209
209
|
):
|
|
210
210
|
"""mdmd:hidden
|
|
211
211
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -446,10 +446,10 @@ Obj = synchronize_api(_Obj)
|
|
|
446
446
|
class _Cls(_Object, type_prefix="cs"):
|
|
447
447
|
"""
|
|
448
448
|
Cls adds method pooling and [lifecycle hook](https://modal.com/docs/guide/lifecycle-functions) behavior
|
|
449
|
-
to [modal.Function](https://modal.com/docs/
|
|
449
|
+
to [modal.Function](https://modal.com/docs/sdk/py/latest/modal.Function).
|
|
450
450
|
|
|
451
451
|
Generally, you will not construct a Cls directly.
|
|
452
|
-
Instead, use the [`@app.cls()`](https://modal.com/docs/
|
|
452
|
+
Instead, use the [`@app.cls()`](https://modal.com/docs/sdk/py/latest/modal.App#cls) decorator on the App object.
|
|
453
453
|
"""
|
|
454
454
|
|
|
455
455
|
_class_service_function: _Function | None # The _Function (read "service") serving *all* methods of the class
|