modal 1.0.6.dev34__tar.gz → 1.0.6.dev35__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.dev35}/PKG-INFO +1 -1
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/app.py +20 -4
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/app.pyi +40 -8
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/client.pyi +2 -2
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/experimental/__init__.py +47 -1
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal.egg-info/PKG-INFO +1 -1
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_version/__init__.py +1 -1
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/LICENSE +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/README.md +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/__main__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_clustered_functions.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_clustered_functions.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_container_entrypoint.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_functions.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_ipython.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_location.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_object.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_output.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_partial_function.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_pty.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_resolver.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_resources.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/asgi.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/container_io_manager.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/container_io_manager.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/execution_context.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/execution_context.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/gpu_memory_snapshot.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/telemetry.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/user_code_imports.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_serialization.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_traceback.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_tunnel.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_tunnel.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_type_manager.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/app_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/async_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/auth_token_manager.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/blob_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/bytes_io_segment_payload.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/deprecation.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/docker_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/function_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/git_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/grpc_testing.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/grpc_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/hash_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/http_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/jwt_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/logger.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/mount_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/name_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/package_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/pattern_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/rand_pb_testing.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/shell_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/time_utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_vendor/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_vendor/a2wsgi_wsgi.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_vendor/cloudpickle.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_vendor/tblib.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_watcher.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/call_graph.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/_download.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/_traceback.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/app.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/cluster.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/config.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/container.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/dict.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/entry_point.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/environment.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/import_refs.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/launch.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/network_file_system.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/profile.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/programs/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/programs/run_jupyter.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/programs/vscode.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/queues.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/run.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/secret.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/token.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/utils.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/volume.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/client.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cloud_bucket_mount.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cloud_bucket_mount.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cls.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cls.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/config.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/container_process.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/container_process.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/dict.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/dict.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/environments.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/environments.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/exception.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/experimental/ipython.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/file_io.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/file_io.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/file_pattern_matcher.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/functions.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/functions.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/gpu.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/image.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/image.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/io_streams.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/io_streams.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/mount.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/mount.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/network_file_system.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/network_file_system.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/object.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/object.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/output.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/parallel_map.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/parallel_map.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/partial_function.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/partial_function.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/proxy.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/proxy.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/py.typed +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/queue.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/queue.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/requirements/2023.12.312.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/requirements/2023.12.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/requirements/2024.04.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/requirements/2024.10.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/requirements/2025.06.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/requirements/PREVIEW.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/requirements/README.md +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/requirements/base-images.json +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/retries.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/runner.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/runner.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/running_app.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/sandbox.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/sandbox.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/schedule.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/scheduler_placement.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/secret.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/secret.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/serving.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/serving.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/snapshot.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/snapshot.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/stream_type.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/token_flow.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/token_flow.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/volume.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/volume.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal.egg-info/SOURCES.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal.egg-info/dependency_links.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal.egg-info/entry_points.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal.egg-info/requires.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal.egg-info/top_level.txt +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_docs/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_docs/gen_cli_docs.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_docs/gen_reference_docs.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_docs/mdmd/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_docs/mdmd/mdmd.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_docs/mdmd/signatures.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/__init__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/api.proto +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/api_grpc.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/api_pb2.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/api_pb2.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/api_pb2_grpc.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/api_pb2_grpc.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/modal_api_grpc.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/modal_options_grpc.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/options.proto +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/options_grpc.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/options_pb2.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/options_pb2.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/options_pb2_grpc.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/options_pb2_grpc.pyi +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/py.typed +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_version/__main__.py +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/pyproject.toml +0 -0
- {modal-1.0.6.dev34 → modal-1.0.6.dev35}/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.dev35",
|
|
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.dev35",
|
|
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],
|
|
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
|