modal 1.0.6.dev34__tar.gz → 1.0.6.dev36__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.
Potentially problematic release.
This version of modal might be problematic. Click here for more details.
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/PKG-INFO +1 -1
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/app.py +20 -4
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/app.pyi +40 -8
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/client.pyi +2 -2
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/experimental/__init__.py +47 -1
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/functions.pyi +6 -6
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal.egg-info/PKG-INFO +1 -1
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_proto/api.proto +14 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_proto/api_grpc.py +16 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_proto/api_pb2.py +322 -302
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_proto/api_pb2.pyi +43 -3
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_proto/api_pb2_grpc.py +33 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_proto/api_pb2_grpc.pyi +10 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_proto/modal_api_grpc.py +1 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_version/__init__.py +1 -1
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/LICENSE +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/README.md +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/__main__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_clustered_functions.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_clustered_functions.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_container_entrypoint.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_functions.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_ipython.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_location.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_object.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_output.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_partial_function.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_pty.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_resolver.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_resources.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_runtime/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_runtime/asgi.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_runtime/container_io_manager.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_runtime/container_io_manager.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_runtime/execution_context.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_runtime/execution_context.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_runtime/gpu_memory_snapshot.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_runtime/telemetry.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_runtime/user_code_imports.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_serialization.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_traceback.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_tunnel.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_tunnel.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_type_manager.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/app_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/async_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/auth_token_manager.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/blob_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/bytes_io_segment_payload.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/deprecation.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/docker_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/function_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/git_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/grpc_testing.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/grpc_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/hash_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/http_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/jwt_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/logger.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/mount_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/name_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/package_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/pattern_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/rand_pb_testing.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/shell_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_utils/time_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_vendor/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_vendor/a2wsgi_wsgi.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_vendor/cloudpickle.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_vendor/tblib.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/_watcher.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/call_graph.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/_download.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/_traceback.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/app.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/cluster.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/config.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/container.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/dict.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/entry_point.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/environment.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/import_refs.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/launch.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/network_file_system.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/profile.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/programs/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/programs/run_jupyter.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/programs/vscode.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/queues.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/run.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/secret.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/token.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cli/volume.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/client.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cloud_bucket_mount.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cloud_bucket_mount.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cls.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/cls.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/config.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/container_process.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/container_process.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/dict.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/dict.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/environments.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/environments.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/exception.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/experimental/ipython.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/file_io.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/file_io.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/file_pattern_matcher.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/functions.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/gpu.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/image.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/image.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/io_streams.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/io_streams.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/mount.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/mount.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/network_file_system.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/network_file_system.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/object.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/object.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/output.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/parallel_map.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/parallel_map.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/partial_function.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/partial_function.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/proxy.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/proxy.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/py.typed +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/queue.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/queue.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/requirements/2023.12.312.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/requirements/2023.12.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/requirements/2024.04.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/requirements/2024.10.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/requirements/2025.06.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/requirements/PREVIEW.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/requirements/README.md +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/requirements/base-images.json +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/retries.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/runner.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/runner.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/running_app.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/sandbox.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/sandbox.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/schedule.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/scheduler_placement.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/secret.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/secret.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/serving.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/serving.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/snapshot.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/snapshot.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/stream_type.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/token_flow.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/token_flow.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/volume.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal/volume.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal.egg-info/SOURCES.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal.egg-info/dependency_links.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal.egg-info/entry_points.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal.egg-info/requires.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal.egg-info/top_level.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_docs/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_docs/gen_cli_docs.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_docs/gen_reference_docs.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_docs/mdmd/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_docs/mdmd/mdmd.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_docs/mdmd/signatures.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_proto/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_proto/modal_options_grpc.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_proto/options.proto +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_proto/options_grpc.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_proto/options_pb2.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_proto/options_pb2.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_proto/options_pb2_grpc.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_proto/options_pb2_grpc.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_proto/py.typed +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/modal_version/__main__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/pyproject.toml +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev36}/setup.cfg +0 -0
|
@@ -508,22 +508,38 @@ class _App:
|
|
|
508
508
|
|
|
509
509
|
@property
|
|
510
510
|
def registered_functions(self) -> dict[str, _Function]:
|
|
511
|
-
"""All modal.Function objects registered on the app.
|
|
511
|
+
"""All modal.Function objects registered on the app.
|
|
512
|
+
|
|
513
|
+
Note: this property is populated only during the build phase, and it is not
|
|
514
|
+
expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
|
|
515
|
+
"""
|
|
512
516
|
return self._functions
|
|
513
517
|
|
|
514
518
|
@property
|
|
515
519
|
def registered_classes(self) -> dict[str, _Cls]:
|
|
516
|
-
"""All modal.Cls objects registered on the app.
|
|
520
|
+
"""All modal.Cls objects registered on the app.
|
|
521
|
+
|
|
522
|
+
Note: this property is populated only during the build phase, and it is not
|
|
523
|
+
expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
|
|
524
|
+
"""
|
|
517
525
|
return self._classes
|
|
518
526
|
|
|
519
527
|
@property
|
|
520
528
|
def registered_entrypoints(self) -> dict[str, _LocalEntrypoint]:
|
|
521
|
-
"""All local CLI entrypoints registered on the app.
|
|
529
|
+
"""All local CLI entrypoints registered on the app.
|
|
530
|
+
|
|
531
|
+
Note: this property is populated only during the build phase, and it is not
|
|
532
|
+
expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
|
|
533
|
+
"""
|
|
522
534
|
return self._local_entrypoints
|
|
523
535
|
|
|
524
536
|
@property
|
|
525
537
|
def registered_web_endpoints(self) -> list[str]:
|
|
526
|
-
"""Names of web endpoint (ie. webhook) functions registered on the app.
|
|
538
|
+
"""Names of web endpoint (ie. webhook) functions registered on the app.
|
|
539
|
+
|
|
540
|
+
Note: this property is populated only during the build phase, and it is not
|
|
541
|
+
expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
|
|
542
|
+
"""
|
|
527
543
|
return self._web_endpoints
|
|
528
544
|
|
|
529
545
|
def local_entrypoint(
|
|
@@ -299,22 +299,38 @@ class _App:
|
|
|
299
299
|
def _init_container(self, client: modal.client._Client, running_app: modal.running_app.RunningApp): ...
|
|
300
300
|
@property
|
|
301
301
|
def registered_functions(self) -> dict[str, modal._functions._Function]:
|
|
302
|
-
"""All modal.Function objects registered on the app.
|
|
302
|
+
"""All modal.Function objects registered on the app.
|
|
303
|
+
|
|
304
|
+
Note: this property is populated only during the build phase, and it is not
|
|
305
|
+
expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
|
|
306
|
+
"""
|
|
303
307
|
...
|
|
304
308
|
|
|
305
309
|
@property
|
|
306
310
|
def registered_classes(self) -> dict[str, modal.cls._Cls]:
|
|
307
|
-
"""All modal.Cls objects registered on the app.
|
|
311
|
+
"""All modal.Cls objects registered on the app.
|
|
312
|
+
|
|
313
|
+
Note: this property is populated only during the build phase, and it is not
|
|
314
|
+
expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
|
|
315
|
+
"""
|
|
308
316
|
...
|
|
309
317
|
|
|
310
318
|
@property
|
|
311
319
|
def registered_entrypoints(self) -> dict[str, _LocalEntrypoint]:
|
|
312
|
-
"""All local CLI entrypoints registered on the app.
|
|
320
|
+
"""All local CLI entrypoints registered on the app.
|
|
321
|
+
|
|
322
|
+
Note: this property is populated only during the build phase, and it is not
|
|
323
|
+
expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
|
|
324
|
+
"""
|
|
313
325
|
...
|
|
314
326
|
|
|
315
327
|
@property
|
|
316
328
|
def registered_web_endpoints(self) -> list[str]:
|
|
317
|
-
"""Names of web endpoint (ie. webhook) functions registered on the app.
|
|
329
|
+
"""Names of web endpoint (ie. webhook) functions registered on the app.
|
|
330
|
+
|
|
331
|
+
Note: this property is populated only during the build phase, and it is not
|
|
332
|
+
expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
|
|
333
|
+
"""
|
|
318
334
|
...
|
|
319
335
|
|
|
320
336
|
def local_entrypoint(
|
|
@@ -888,22 +904,38 @@ class App:
|
|
|
888
904
|
def _init_container(self, client: modal.client.Client, running_app: modal.running_app.RunningApp): ...
|
|
889
905
|
@property
|
|
890
906
|
def registered_functions(self) -> dict[str, modal.functions.Function]:
|
|
891
|
-
"""All modal.Function objects registered on the app.
|
|
907
|
+
"""All modal.Function objects registered on the app.
|
|
908
|
+
|
|
909
|
+
Note: this property is populated only during the build phase, and it is not
|
|
910
|
+
expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
|
|
911
|
+
"""
|
|
892
912
|
...
|
|
893
913
|
|
|
894
914
|
@property
|
|
895
915
|
def registered_classes(self) -> dict[str, modal.cls.Cls]:
|
|
896
|
-
"""All modal.Cls objects registered on the app.
|
|
916
|
+
"""All modal.Cls objects registered on the app.
|
|
917
|
+
|
|
918
|
+
Note: this property is populated only during the build phase, and it is not
|
|
919
|
+
expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
|
|
920
|
+
"""
|
|
897
921
|
...
|
|
898
922
|
|
|
899
923
|
@property
|
|
900
924
|
def registered_entrypoints(self) -> dict[str, LocalEntrypoint]:
|
|
901
|
-
"""All local CLI entrypoints registered on the app.
|
|
925
|
+
"""All local CLI entrypoints registered on the app.
|
|
926
|
+
|
|
927
|
+
Note: this property is populated only during the build phase, and it is not
|
|
928
|
+
expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
|
|
929
|
+
"""
|
|
902
930
|
...
|
|
903
931
|
|
|
904
932
|
@property
|
|
905
933
|
def registered_web_endpoints(self) -> list[str]:
|
|
906
|
-
"""Names of web endpoint (ie. webhook) functions registered on the app.
|
|
934
|
+
"""Names of web endpoint (ie. webhook) functions registered on the app.
|
|
935
|
+
|
|
936
|
+
Note: this property is populated only during the build phase, and it is not
|
|
937
|
+
expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
|
|
938
|
+
"""
|
|
907
939
|
...
|
|
908
940
|
|
|
909
941
|
def local_entrypoint(
|
|
@@ -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.0.6.
|
|
36
|
+
version: str = "1.0.6.dev36",
|
|
37
37
|
):
|
|
38
38
|
"""mdmd:hidden
|
|
39
39
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -163,7 +163,7 @@ class Client:
|
|
|
163
163
|
server_url: str,
|
|
164
164
|
client_type: int,
|
|
165
165
|
credentials: typing.Optional[tuple[str, str]],
|
|
166
|
-
version: str = "1.0.6.
|
|
166
|
+
version: str = "1.0.6.dev36",
|
|
167
167
|
):
|
|
168
168
|
"""mdmd:hidden
|
|
169
169
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -17,8 +17,9 @@ from .._tunnel import _forward as _forward_tunnel
|
|
|
17
17
|
from .._utils.async_utils import synchronize_api, synchronizer
|
|
18
18
|
from .._utils.deprecation import deprecation_warning
|
|
19
19
|
from .._utils.grpc_utils import retry_transient_errors
|
|
20
|
+
from ..app import _App
|
|
20
21
|
from ..client import _Client
|
|
21
|
-
from ..cls import _Obj
|
|
22
|
+
from ..cls import _Cls, _Obj
|
|
22
23
|
from ..config import logger
|
|
23
24
|
from ..exception import InvalidError
|
|
24
25
|
from ..image import DockerfileSpec, ImageBuilderVersion, _Image, _ImageRegistryConfig
|
|
@@ -88,6 +89,51 @@ async def list_deployed_apps(environment_name: str = "", client: Optional[_Clien
|
|
|
88
89
|
return app_infos
|
|
89
90
|
|
|
90
91
|
|
|
92
|
+
@synchronizer.create_blocking
|
|
93
|
+
async def get_app_objects(
|
|
94
|
+
app_name: str, *, environment_name: Optional[str] = None, client: Optional[_Client] = None
|
|
95
|
+
) -> dict[str, Union[_Function, _Cls]]:
|
|
96
|
+
"""Experimental interface for retrieving a dictionary of the Functions / Clses in an App.
|
|
97
|
+
|
|
98
|
+
The return value is a dictionary mapping names to unhydrated Function or Cls objects.
|
|
99
|
+
|
|
100
|
+
We plan to support this functionality through a stable API in the future. It's likely that
|
|
101
|
+
the stable API will look different (it will probably be a method on the App object itself).
|
|
102
|
+
|
|
103
|
+
"""
|
|
104
|
+
# This is implemented through a somewhat odd mixture of internal RPCs and public APIs.
|
|
105
|
+
# While AppGetLayout provides the object ID and metadata for each object in the App, it's
|
|
106
|
+
# currently somewhere between very awkward and impossible to hydrate a modal.Cls with just
|
|
107
|
+
# that information, since the "class service function" needs to be loaded first
|
|
108
|
+
# (and it's not always possible to do that without knowledge of the parameterization).
|
|
109
|
+
# So instead we just use AppGetLayout to retrieve the names of the Functions / Clsices on
|
|
110
|
+
# the App and then use the public .from_name constructors to return unhydrated handles.
|
|
111
|
+
|
|
112
|
+
# Additionally, since we need to know the environment name to use `.from_name`, and the App's
|
|
113
|
+
# environment name isn't stored anywhere on the App (and cannot be retrieved via an RPC), the
|
|
114
|
+
# experimental function is parameterized by an App name while the stable API would instead
|
|
115
|
+
# be a method on the App itself.
|
|
116
|
+
|
|
117
|
+
if client is None:
|
|
118
|
+
client = await _Client.from_env()
|
|
119
|
+
|
|
120
|
+
app = await _App.lookup(app_name, environment_name=environment_name, client=client)
|
|
121
|
+
req = api_pb2.AppGetLayoutRequest(app_id=app.app_id)
|
|
122
|
+
app_layout_resp = await retry_transient_errors(client.stub.AppGetLayout, req)
|
|
123
|
+
|
|
124
|
+
app_objects: dict[str, Union[_Function, _Cls]] = {}
|
|
125
|
+
|
|
126
|
+
for cls_name in app_layout_resp.app_layout.class_ids:
|
|
127
|
+
app_objects[cls_name] = _Cls.from_name(app_name, cls_name, environment_name=environment_name)
|
|
128
|
+
|
|
129
|
+
for func_name in app_layout_resp.app_layout.function_ids:
|
|
130
|
+
if func_name.endswith(".*"):
|
|
131
|
+
continue # TODO explain
|
|
132
|
+
app_objects[func_name] = _Function.from_name(app_name, func_name, environment_name=environment_name)
|
|
133
|
+
|
|
134
|
+
return app_objects
|
|
135
|
+
|
|
136
|
+
|
|
91
137
|
@synchronizer.create_blocking
|
|
92
138
|
async def raw_dockerfile_image(
|
|
93
139
|
path: Union[str, Path],
|
|
@@ -428,7 +428,7 @@ class Function(
|
|
|
428
428
|
|
|
429
429
|
_call_generator: ___call_generator_spec[typing_extensions.Self]
|
|
430
430
|
|
|
431
|
-
class __remote_spec(typing_extensions.Protocol[
|
|
431
|
+
class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
|
432
432
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER:
|
|
433
433
|
"""Calls the function remotely, executing it with the given arguments and returning the execution's result."""
|
|
434
434
|
...
|
|
@@ -437,7 +437,7 @@ class Function(
|
|
|
437
437
|
"""Calls the function remotely, executing it with the given arguments and returning the execution's result."""
|
|
438
438
|
...
|
|
439
439
|
|
|
440
|
-
remote: __remote_spec[modal._functions.
|
|
440
|
+
remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
|
441
441
|
|
|
442
442
|
class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
|
443
443
|
def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]:
|
|
@@ -464,7 +464,7 @@ class Function(
|
|
|
464
464
|
"""
|
|
465
465
|
...
|
|
466
466
|
|
|
467
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
|
467
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
|
468
468
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
|
469
469
|
"""[Experimental] Calls the function with the given arguments, without waiting for the results.
|
|
470
470
|
|
|
@@ -488,7 +488,7 @@ class Function(
|
|
|
488
488
|
...
|
|
489
489
|
|
|
490
490
|
_experimental_spawn: ___experimental_spawn_spec[
|
|
491
|
-
modal._functions.
|
|
491
|
+
modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
|
|
492
492
|
]
|
|
493
493
|
|
|
494
494
|
class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER, SUPERSELF]):
|
|
@@ -497,7 +497,7 @@ class Function(
|
|
|
497
497
|
|
|
498
498
|
_spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P, typing_extensions.Self]
|
|
499
499
|
|
|
500
|
-
class __spawn_spec(typing_extensions.Protocol[
|
|
500
|
+
class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
|
501
501
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
|
502
502
|
"""Calls the function with the given arguments, without waiting for the results.
|
|
503
503
|
|
|
@@ -518,7 +518,7 @@ class Function(
|
|
|
518
518
|
"""
|
|
519
519
|
...
|
|
520
520
|
|
|
521
|
-
spawn: __spawn_spec[modal._functions.
|
|
521
|
+
spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
|
522
522
|
|
|
523
523
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]:
|
|
524
524
|
"""Return the inner Python object wrapped by this Modal Function."""
|
|
@@ -2514,6 +2514,9 @@ message Sandbox {
|
|
|
2514
2514
|
|
|
2515
2515
|
// If set, the sandbox will be created with verbose logging enabled.
|
|
2516
2516
|
bool verbose = 29;
|
|
2517
|
+
|
|
2518
|
+
// If set, the sandbox will be created with a name.
|
|
2519
|
+
optional string name = 30;
|
|
2517
2520
|
}
|
|
2518
2521
|
|
|
2519
2522
|
message SandboxCreateRequest {
|
|
@@ -2526,6 +2529,15 @@ message SandboxCreateResponse {
|
|
|
2526
2529
|
string sandbox_id = 1;
|
|
2527
2530
|
}
|
|
2528
2531
|
|
|
2532
|
+
message SandboxGetFromNameRequest {
|
|
2533
|
+
string sandbox_name = 1;
|
|
2534
|
+
string environment_name = 2;
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
message SandboxGetFromNameResponse {
|
|
2538
|
+
string sandbox_id = 1;
|
|
2539
|
+
}
|
|
2540
|
+
|
|
2529
2541
|
message SandboxGetLogsRequest {
|
|
2530
2542
|
string sandbox_id = 1;
|
|
2531
2543
|
FileDescriptor file_descriptor = 2;
|
|
@@ -2575,6 +2587,7 @@ message SandboxInfo {
|
|
|
2575
2587
|
TaskInfo task_info = 4;
|
|
2576
2588
|
string app_id = 5;
|
|
2577
2589
|
repeated SandboxTag tags = 6; // TODO: Not yet exposed in client library.
|
|
2590
|
+
string name = 7;
|
|
2578
2591
|
|
|
2579
2592
|
reserved 2; // modal.client.Sandbox definition
|
|
2580
2593
|
}
|
|
@@ -3397,6 +3410,7 @@ service ModalClient {
|
|
|
3397
3410
|
|
|
3398
3411
|
// Sandboxes
|
|
3399
3412
|
rpc SandboxCreate(SandboxCreateRequest) returns (SandboxCreateResponse);
|
|
3413
|
+
rpc SandboxGetFromName(SandboxGetFromNameRequest) returns (SandboxGetFromNameResponse);
|
|
3400
3414
|
rpc SandboxGetLogs(SandboxGetLogsRequest) returns (stream TaskLogsBatch);
|
|
3401
3415
|
rpc SandboxGetResourceUsage(SandboxGetResourceUsageRequest) returns (SandboxGetResourceUsageResponse);
|
|
3402
3416
|
rpc SandboxGetTaskId(SandboxGetTaskIdRequest) returns (SandboxGetTaskIdResponse); // needed for modal container exec
|
|
@@ -442,6 +442,10 @@ class ModalClientBase(abc.ABC):
|
|
|
442
442
|
async def SandboxCreate(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxCreateRequest, modal_proto.api_pb2.SandboxCreateResponse]') -> None:
|
|
443
443
|
pass
|
|
444
444
|
|
|
445
|
+
@abc.abstractmethod
|
|
446
|
+
async def SandboxGetFromName(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxGetFromNameRequest, modal_proto.api_pb2.SandboxGetFromNameResponse]') -> None:
|
|
447
|
+
pass
|
|
448
|
+
|
|
445
449
|
@abc.abstractmethod
|
|
446
450
|
async def SandboxGetLogs(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxGetLogsRequest, modal_proto.api_pb2.TaskLogsBatch]') -> None:
|
|
447
451
|
pass
|
|
@@ -1288,6 +1292,12 @@ class ModalClientBase(abc.ABC):
|
|
|
1288
1292
|
modal_proto.api_pb2.SandboxCreateRequest,
|
|
1289
1293
|
modal_proto.api_pb2.SandboxCreateResponse,
|
|
1290
1294
|
),
|
|
1295
|
+
'/modal.client.ModalClient/SandboxGetFromName': grpclib.const.Handler(
|
|
1296
|
+
self.SandboxGetFromName,
|
|
1297
|
+
grpclib.const.Cardinality.UNARY_UNARY,
|
|
1298
|
+
modal_proto.api_pb2.SandboxGetFromNameRequest,
|
|
1299
|
+
modal_proto.api_pb2.SandboxGetFromNameResponse,
|
|
1300
|
+
),
|
|
1291
1301
|
'/modal.client.ModalClient/SandboxGetLogs': grpclib.const.Handler(
|
|
1292
1302
|
self.SandboxGetLogs,
|
|
1293
1303
|
grpclib.const.Cardinality.UNARY_STREAM,
|
|
@@ -2242,6 +2252,12 @@ class ModalClientStub:
|
|
|
2242
2252
|
modal_proto.api_pb2.SandboxCreateRequest,
|
|
2243
2253
|
modal_proto.api_pb2.SandboxCreateResponse,
|
|
2244
2254
|
)
|
|
2255
|
+
self.SandboxGetFromName = grpclib.client.UnaryUnaryMethod(
|
|
2256
|
+
channel,
|
|
2257
|
+
'/modal.client.ModalClient/SandboxGetFromName',
|
|
2258
|
+
modal_proto.api_pb2.SandboxGetFromNameRequest,
|
|
2259
|
+
modal_proto.api_pb2.SandboxGetFromNameResponse,
|
|
2260
|
+
)
|
|
2245
2261
|
self.SandboxGetLogs = grpclib.client.UnaryStreamMethod(
|
|
2246
2262
|
channel,
|
|
2247
2263
|
'/modal.client.ModalClient/SandboxGetLogs',
|