modal 1.1.5.dev87__tar.gz → 1.1.5.dev89__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.1.5.dev87 → modal-1.1.5.dev89}/PKG-INFO +1 -1
- modal-1.1.5.dev89/modal/_billing.py +80 -0
- modal-1.1.5.dev89/modal/billing.py +5 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/client.pyi +2 -2
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal.egg-info/PKG-INFO +1 -1
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal.egg-info/SOURCES.txt +2 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/task_command_router.proto +1 -1
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/task_command_router_grpc.py +12 -12
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/task_command_router_pb2.py +4 -4
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/task_command_router_pb2_grpc.py +15 -15
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/task_command_router_pb2_grpc.pyi +3 -3
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_version/__init__.py +1 -1
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/LICENSE +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/README.md +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/__init__.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/__main__.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_clustered_functions.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_clustered_functions.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_container_entrypoint.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_functions.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_ipython.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_location.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_object.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_output.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_partial_function.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_pty.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_resolver.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_resources.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_runtime/__init__.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_runtime/asgi.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_runtime/container_io_manager.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_runtime/container_io_manager.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_runtime/execution_context.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_runtime/execution_context.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_runtime/gpu_memory_snapshot.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_runtime/telemetry.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_runtime/user_code_imports.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_serialization.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_traceback.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_tunnel.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_tunnel.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_type_manager.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/__init__.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/app_utils.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/async_utils.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/auth_token_manager.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/blob_utils.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/bytes_io_segment_payload.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/deprecation.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/docker_utils.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/function_utils.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/git_utils.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/grpc_testing.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/grpc_utils.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/hash_utils.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/http_utils.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/jwt_utils.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/logger.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/mount_utils.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/name_utils.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/package_utils.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/pattern_utils.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/rand_pb_testing.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/shell_utils.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_utils/time_utils.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_vendor/__init__.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_vendor/a2wsgi_wsgi.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_vendor/cloudpickle.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_vendor/tblib.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/_watcher.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/app.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/app.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/builder/2023.12.312.txt +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/builder/2023.12.txt +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/builder/2024.04.txt +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/builder/2024.10.txt +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/builder/2025.06.txt +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/builder/PREVIEW.txt +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/builder/README.md +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/builder/base-images.json +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/call_graph.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/__init__.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/_download.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/_traceback.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/app.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/cluster.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/config.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/container.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/dict.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/entry_point.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/environment.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/import_refs.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/launch.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/network_file_system.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/profile.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/programs/__init__.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/programs/launch_instance_ssh.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/programs/run_jupyter.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/programs/run_marimo.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/programs/vscode.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/queues.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/run.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/secret.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/token.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/utils.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cli/volume.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/client.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cloud_bucket_mount.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cloud_bucket_mount.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cls.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/cls.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/config.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/container_process.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/container_process.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/dict.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/dict.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/environments.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/environments.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/exception.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/experimental/__init__.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/experimental/flash.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/experimental/flash.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/experimental/ipython.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/file_io.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/file_io.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/file_pattern_matcher.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/functions.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/functions.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/gpu.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/image.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/image.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/io_streams.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/io_streams.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/mount.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/mount.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/network_file_system.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/network_file_system.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/object.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/object.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/output.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/parallel_map.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/parallel_map.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/partial_function.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/partial_function.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/proxy.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/proxy.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/py.typed +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/queue.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/queue.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/retries.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/runner.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/runner.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/running_app.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/sandbox.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/sandbox.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/schedule.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/scheduler_placement.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/secret.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/secret.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/serving.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/serving.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/snapshot.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/snapshot.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/stream_type.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/token_flow.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/token_flow.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/volume.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal/volume.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal.egg-info/dependency_links.txt +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal.egg-info/entry_points.txt +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal.egg-info/requires.txt +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal.egg-info/top_level.txt +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_docs/__init__.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_docs/gen_cli_docs.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_docs/gen_reference_docs.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_docs/mdmd/__init__.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_docs/mdmd/mdmd.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_docs/mdmd/signatures.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/__init__.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/api.proto +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/api_grpc.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/api_pb2.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/api_pb2.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/api_pb2_grpc.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/api_pb2_grpc.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/modal_api_grpc.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/py.typed +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/sandbox_router.proto +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/sandbox_router_grpc.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/sandbox_router_pb2.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/sandbox_router_pb2.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/sandbox_router_pb2_grpc.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/sandbox_router_pb2_grpc.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_proto/task_command_router_pb2.pyi +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/modal_version/__main__.py +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/pyproject.toml +0 -0
- {modal-1.1.5.dev87 → modal-1.1.5.dev89}/setup.cfg +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Copyright Modal Labs 2025
|
|
2
|
+
from datetime import datetime, timezone
|
|
3
|
+
from decimal import Decimal
|
|
4
|
+
from typing import Any, Optional, TypedDict
|
|
5
|
+
|
|
6
|
+
from modal_proto import api_pb2
|
|
7
|
+
|
|
8
|
+
from .client import _Client
|
|
9
|
+
from .exception import InvalidError
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class WorkspaceBillingReportItem(TypedDict):
|
|
13
|
+
object_id: str
|
|
14
|
+
description: str
|
|
15
|
+
environment_name: str
|
|
16
|
+
interval_start: datetime
|
|
17
|
+
cost: Decimal
|
|
18
|
+
tags: dict[str, str]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
async def _workspace_billing_report(
|
|
22
|
+
*,
|
|
23
|
+
start: datetime, # Start of the report, inclusive
|
|
24
|
+
end: Optional[datetime] = None, # End of the report, exclusive
|
|
25
|
+
resolution: str = "d", # Resolution, e.g. "d" for daily or "h" for hourly
|
|
26
|
+
tag_names: Optional[list[str]] = None, # Optional additional metadata to include
|
|
27
|
+
client: Optional[_Client] = None,
|
|
28
|
+
) -> list[dict[str, Any]]:
|
|
29
|
+
"""Generate a tabular report of workspace usage by object and time.
|
|
30
|
+
|
|
31
|
+
The result will be a list of dictionaries for each interval (determined by `resolution`)
|
|
32
|
+
between the `start` and `end` limits. The dictionary represents a single Modal object
|
|
33
|
+
that billing can be attributed to (e.g., an App) along with metadata (including user-defined
|
|
34
|
+
tags) for identifying that object.
|
|
35
|
+
|
|
36
|
+
The `start` and `end` parameters are required to either have a UTC timezone or to be
|
|
37
|
+
timezone-naive (which will be interpreted as UTC times). The timestamps in the result will
|
|
38
|
+
be in UTC. Cost will be reported for full intervals, even if the provided `start` or `end`
|
|
39
|
+
parameters are partial: `start` will be rounded to the beginning of its interval, while
|
|
40
|
+
partial `end` intervals will be excluded.
|
|
41
|
+
|
|
42
|
+
Additional user-provided metadata can be included in the report if the objects have tags
|
|
43
|
+
and `tag_names` (i.e., keys) are specified in the request. Note that tags will be attributed
|
|
44
|
+
to the entire interval even if they were added or removed at some point within it.
|
|
45
|
+
|
|
46
|
+
"""
|
|
47
|
+
if client is None:
|
|
48
|
+
client = await _Client.from_env()
|
|
49
|
+
|
|
50
|
+
tag_names = tag_names or []
|
|
51
|
+
|
|
52
|
+
if end is None:
|
|
53
|
+
end = datetime.now(timezone.utc)
|
|
54
|
+
|
|
55
|
+
for dt in (start, end):
|
|
56
|
+
if dt.tzinfo is None:
|
|
57
|
+
dt = dt.replace(tzinfo=timezone.utc)
|
|
58
|
+
elif dt.tzinfo != timezone.utc:
|
|
59
|
+
raise InvalidError("Timezone-aware start/end limits must be in UTC.")
|
|
60
|
+
|
|
61
|
+
request = api_pb2.WorkspaceBillingReportRequest(
|
|
62
|
+
resolution=resolution,
|
|
63
|
+
tag_names=tag_names,
|
|
64
|
+
)
|
|
65
|
+
request.start_timestamp.FromDatetime(start)
|
|
66
|
+
request.end_timestamp.FromDatetime(end)
|
|
67
|
+
|
|
68
|
+
rows = []
|
|
69
|
+
async for pb_item in client.stub.WorkspaceBillingReport.unary_stream(request):
|
|
70
|
+
item = {
|
|
71
|
+
"object_id": pb_item.object_id,
|
|
72
|
+
"description": pb_item.description,
|
|
73
|
+
"environment_name": pb_item.environment_name,
|
|
74
|
+
"interval_start": pb_item.interval.ToDatetime().replace(tzinfo=timezone.utc),
|
|
75
|
+
"cost": Decimal(pb_item.cost),
|
|
76
|
+
"tags": dict(pb_item.tags),
|
|
77
|
+
}
|
|
78
|
+
rows.append(item)
|
|
79
|
+
|
|
80
|
+
return rows
|
|
@@ -33,7 +33,7 @@ class _Client:
|
|
|
33
33
|
server_url: str,
|
|
34
34
|
client_type: int,
|
|
35
35
|
credentials: typing.Optional[tuple[str, str]],
|
|
36
|
-
version: str = "1.1.5.
|
|
36
|
+
version: str = "1.1.5.dev89",
|
|
37
37
|
):
|
|
38
38
|
"""mdmd:hidden
|
|
39
39
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -164,7 +164,7 @@ class Client:
|
|
|
164
164
|
server_url: str,
|
|
165
165
|
client_type: int,
|
|
166
166
|
credentials: typing.Optional[tuple[str, str]],
|
|
167
|
-
version: str = "1.1.5.
|
|
167
|
+
version: str = "1.1.5.dev89",
|
|
168
168
|
):
|
|
169
169
|
"""mdmd:hidden
|
|
170
170
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -3,6 +3,7 @@ README.md
|
|
|
3
3
|
pyproject.toml
|
|
4
4
|
modal/__init__.py
|
|
5
5
|
modal/__main__.py
|
|
6
|
+
modal/_billing.py
|
|
6
7
|
modal/_clustered_functions.py
|
|
7
8
|
modal/_clustered_functions.pyi
|
|
8
9
|
modal/_container_entrypoint.py
|
|
@@ -23,6 +24,7 @@ modal/_type_manager.py
|
|
|
23
24
|
modal/_watcher.py
|
|
24
25
|
modal/app.py
|
|
25
26
|
modal/app.pyi
|
|
27
|
+
modal/billing.py
|
|
26
28
|
modal/call_graph.py
|
|
27
29
|
modal/client.py
|
|
28
30
|
modal/client.pyi
|
|
@@ -130,7 +130,7 @@ message TaskExecWaitResponse {
|
|
|
130
130
|
// and termination by Modal (due to task timeout, exec exceeded deadline, etc.)
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
service
|
|
133
|
+
service TaskCommandRouter {
|
|
134
134
|
// Poll for the exit status of an exec'd command.
|
|
135
135
|
rpc TaskExecPoll(TaskExecPollRequest) returns (TaskExecPollResponse);
|
|
136
136
|
// Execute a command in the task.
|
|
@@ -13,7 +13,7 @@ import modal_proto.api_pb2
|
|
|
13
13
|
import modal_proto.task_command_router_pb2
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class TaskCommandRouterBase(abc.ABC):
|
|
17
17
|
|
|
18
18
|
@abc.abstractmethod
|
|
19
19
|
async def TaskExecPoll(self, stream: 'grpclib.server.Stream[modal_proto.task_command_router_pb2.TaskExecPollRequest, modal_proto.task_command_router_pb2.TaskExecPollResponse]') -> None:
|
|
@@ -37,31 +37,31 @@ class TaskRouterBase(abc.ABC):
|
|
|
37
37
|
|
|
38
38
|
def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
|
|
39
39
|
return {
|
|
40
|
-
'/modal.task_command_router.
|
|
40
|
+
'/modal.task_command_router.TaskCommandRouter/TaskExecPoll': grpclib.const.Handler(
|
|
41
41
|
self.TaskExecPoll,
|
|
42
42
|
grpclib.const.Cardinality.UNARY_UNARY,
|
|
43
43
|
modal_proto.task_command_router_pb2.TaskExecPollRequest,
|
|
44
44
|
modal_proto.task_command_router_pb2.TaskExecPollResponse,
|
|
45
45
|
),
|
|
46
|
-
'/modal.task_command_router.
|
|
46
|
+
'/modal.task_command_router.TaskCommandRouter/TaskExecStart': grpclib.const.Handler(
|
|
47
47
|
self.TaskExecStart,
|
|
48
48
|
grpclib.const.Cardinality.UNARY_UNARY,
|
|
49
49
|
modal_proto.task_command_router_pb2.TaskExecStartRequest,
|
|
50
50
|
modal_proto.task_command_router_pb2.TaskExecStartResponse,
|
|
51
51
|
),
|
|
52
|
-
'/modal.task_command_router.
|
|
52
|
+
'/modal.task_command_router.TaskCommandRouter/TaskExecStdinWrite': grpclib.const.Handler(
|
|
53
53
|
self.TaskExecStdinWrite,
|
|
54
54
|
grpclib.const.Cardinality.UNARY_UNARY,
|
|
55
55
|
modal_proto.task_command_router_pb2.TaskExecStdinWriteRequest,
|
|
56
56
|
modal_proto.task_command_router_pb2.TaskExecStdinWriteResponse,
|
|
57
57
|
),
|
|
58
|
-
'/modal.task_command_router.
|
|
58
|
+
'/modal.task_command_router.TaskCommandRouter/TaskExecStdioRead': grpclib.const.Handler(
|
|
59
59
|
self.TaskExecStdioRead,
|
|
60
60
|
grpclib.const.Cardinality.UNARY_STREAM,
|
|
61
61
|
modal_proto.task_command_router_pb2.TaskExecStdioReadRequest,
|
|
62
62
|
modal_proto.task_command_router_pb2.TaskExecStdioReadResponse,
|
|
63
63
|
),
|
|
64
|
-
'/modal.task_command_router.
|
|
64
|
+
'/modal.task_command_router.TaskCommandRouter/TaskExecWait': grpclib.const.Handler(
|
|
65
65
|
self.TaskExecWait,
|
|
66
66
|
grpclib.const.Cardinality.UNARY_UNARY,
|
|
67
67
|
modal_proto.task_command_router_pb2.TaskExecWaitRequest,
|
|
@@ -70,36 +70,36 @@ class TaskRouterBase(abc.ABC):
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
class
|
|
73
|
+
class TaskCommandRouterStub:
|
|
74
74
|
|
|
75
75
|
def __init__(self, channel: grpclib.client.Channel) -> None:
|
|
76
76
|
self.TaskExecPoll = grpclib.client.UnaryUnaryMethod(
|
|
77
77
|
channel,
|
|
78
|
-
'/modal.task_command_router.
|
|
78
|
+
'/modal.task_command_router.TaskCommandRouter/TaskExecPoll',
|
|
79
79
|
modal_proto.task_command_router_pb2.TaskExecPollRequest,
|
|
80
80
|
modal_proto.task_command_router_pb2.TaskExecPollResponse,
|
|
81
81
|
)
|
|
82
82
|
self.TaskExecStart = grpclib.client.UnaryUnaryMethod(
|
|
83
83
|
channel,
|
|
84
|
-
'/modal.task_command_router.
|
|
84
|
+
'/modal.task_command_router.TaskCommandRouter/TaskExecStart',
|
|
85
85
|
modal_proto.task_command_router_pb2.TaskExecStartRequest,
|
|
86
86
|
modal_proto.task_command_router_pb2.TaskExecStartResponse,
|
|
87
87
|
)
|
|
88
88
|
self.TaskExecStdinWrite = grpclib.client.UnaryUnaryMethod(
|
|
89
89
|
channel,
|
|
90
|
-
'/modal.task_command_router.
|
|
90
|
+
'/modal.task_command_router.TaskCommandRouter/TaskExecStdinWrite',
|
|
91
91
|
modal_proto.task_command_router_pb2.TaskExecStdinWriteRequest,
|
|
92
92
|
modal_proto.task_command_router_pb2.TaskExecStdinWriteResponse,
|
|
93
93
|
)
|
|
94
94
|
self.TaskExecStdioRead = grpclib.client.UnaryStreamMethod(
|
|
95
95
|
channel,
|
|
96
|
-
'/modal.task_command_router.
|
|
96
|
+
'/modal.task_command_router.TaskCommandRouter/TaskExecStdioRead',
|
|
97
97
|
modal_proto.task_command_router_pb2.TaskExecStdioReadRequest,
|
|
98
98
|
modal_proto.task_command_router_pb2.TaskExecStdioReadResponse,
|
|
99
99
|
)
|
|
100
100
|
self.TaskExecWait = grpclib.client.UnaryUnaryMethod(
|
|
101
101
|
channel,
|
|
102
|
-
'/modal.task_command_router.
|
|
102
|
+
'/modal.task_command_router.TaskCommandRouter/TaskExecWait',
|
|
103
103
|
modal_proto.task_command_router_pb2.TaskExecWaitRequest,
|
|
104
104
|
modal_proto.task_command_router_pb2.TaskExecWaitResponse,
|
|
105
105
|
)
|
|
@@ -16,7 +16,7 @@ _sym_db = _symbol_database.Default()
|
|
|
16
16
|
from modal_proto import api_pb2 as modal__proto_dot_api__pb2
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%modal_proto/task_command_router.proto\x12\x19modal.task_command_router\x1a\x15modal_proto/api.proto\"7\n\x13TaskExecPollRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\"G\n\x14TaskExecPollResponse\x12\x0e\n\x04\x63ode\x18\x01 \x01(\x05H\x00\x12\x10\n\x06signal\x18\x02 \x01(\x05H\x00\x42\r\n\x0b\x65xit_status\"\x92\x03\n\x14TaskExecStartRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x14\n\x0c\x63ommand_args\x18\x03 \x03(\t\x12\x46\n\rstdout_config\x18\x04 \x01(\x0e\x32/.modal.task_command_router.TaskExecStdoutConfig\x12\x46\n\rstderr_config\x18\x05 \x01(\x0e\x32/.modal.task_command_router.TaskExecStderrConfig\x12\x19\n\x0ctimeout_secs\x18\x06 \x01(\rH\x00\x88\x01\x01\x12\x14\n\x07workdir\x18\x07 \x01(\tH\x01\x88\x01\x01\x12\x12\n\nsecret_ids\x18\x08 \x03(\t\x12,\n\x08pty_info\x18\t \x01(\x0b\x32\x15.modal.client.PTYInfoH\x02\x88\x01\x01\x12\x15\n\rruntime_debug\x18\n \x01(\x08\x42\x0f\n\r_timeout_secsB\n\n\x08_workdirB\x0b\n\t_pty_info\"\x17\n\x15TaskExecStartResponse\"h\n\x19TaskExecStdinWriteRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x0e\n\x06offset\x18\x03 \x01(\x04\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\x12\x0b\n\x03\x65of\x18\x05 \x01(\x08\"\x1c\n\x1aTaskExecStdinWriteResponse\"\x9d\x01\n\x18TaskExecStdioReadRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x0e\n\x06offset\x18\x03 \x01(\x04\x12O\n\x0f\x66ile_descriptor\x18\x04 \x01(\x0e\x32\x36.modal.task_command_router.TaskExecStdioFileDescriptor\")\n\x19TaskExecStdioReadResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"7\n\x13TaskExecWaitRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\"G\n\x14TaskExecWaitResponse\x12\x0e\n\x04\x63ode\x18\x01 \x01(\x05H\x00\x12\x10\n\x06signal\x18\x02 \x01(\x05H\x00\x42\r\n\x0b\x65xit_status*\x81\x01\n\x14TaskExecStderrConfig\x12#\n\x1fTASK_EXEC_STDERR_CONFIG_DEVNULL\x10\x00\x12 \n\x1cTASK_EXEC_STDERR_CONFIG_PIPE\x10\x01\x12\"\n\x1eTASK_EXEC_STDERR_CONFIG_STDOUT\x10\x02*u\n\x1bTaskExecStdioFileDescriptor\x12*\n&TASK_EXEC_STDIO_FILE_DESCRIPTOR_STDOUT\x10\x00\x12*\n&TASK_EXEC_STDIO_FILE_DESCRIPTOR_STDERR\x10\x01*]\n\x14TaskExecStdoutConfig\x12#\n\x1fTASK_EXEC_STDOUT_CONFIG_DEVNULL\x10\x00\x12 \n\x1cTASK_EXEC_STDOUT_CONFIG_PIPE\x10\x01\x32\
|
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%modal_proto/task_command_router.proto\x12\x19modal.task_command_router\x1a\x15modal_proto/api.proto\"7\n\x13TaskExecPollRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\"G\n\x14TaskExecPollResponse\x12\x0e\n\x04\x63ode\x18\x01 \x01(\x05H\x00\x12\x10\n\x06signal\x18\x02 \x01(\x05H\x00\x42\r\n\x0b\x65xit_status\"\x92\x03\n\x14TaskExecStartRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x14\n\x0c\x63ommand_args\x18\x03 \x03(\t\x12\x46\n\rstdout_config\x18\x04 \x01(\x0e\x32/.modal.task_command_router.TaskExecStdoutConfig\x12\x46\n\rstderr_config\x18\x05 \x01(\x0e\x32/.modal.task_command_router.TaskExecStderrConfig\x12\x19\n\x0ctimeout_secs\x18\x06 \x01(\rH\x00\x88\x01\x01\x12\x14\n\x07workdir\x18\x07 \x01(\tH\x01\x88\x01\x01\x12\x12\n\nsecret_ids\x18\x08 \x03(\t\x12,\n\x08pty_info\x18\t \x01(\x0b\x32\x15.modal.client.PTYInfoH\x02\x88\x01\x01\x12\x15\n\rruntime_debug\x18\n \x01(\x08\x42\x0f\n\r_timeout_secsB\n\n\x08_workdirB\x0b\n\t_pty_info\"\x17\n\x15TaskExecStartResponse\"h\n\x19TaskExecStdinWriteRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x0e\n\x06offset\x18\x03 \x01(\x04\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\x12\x0b\n\x03\x65of\x18\x05 \x01(\x08\"\x1c\n\x1aTaskExecStdinWriteResponse\"\x9d\x01\n\x18TaskExecStdioReadRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x0e\n\x06offset\x18\x03 \x01(\x04\x12O\n\x0f\x66ile_descriptor\x18\x04 \x01(\x0e\x32\x36.modal.task_command_router.TaskExecStdioFileDescriptor\")\n\x19TaskExecStdioReadResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"7\n\x13TaskExecWaitRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\"G\n\x14TaskExecWaitResponse\x12\x0e\n\x04\x63ode\x18\x01 \x01(\x05H\x00\x12\x10\n\x06signal\x18\x02 \x01(\x05H\x00\x42\r\n\x0b\x65xit_status*\x81\x01\n\x14TaskExecStderrConfig\x12#\n\x1fTASK_EXEC_STDERR_CONFIG_DEVNULL\x10\x00\x12 \n\x1cTASK_EXEC_STDERR_CONFIG_PIPE\x10\x01\x12\"\n\x1eTASK_EXEC_STDERR_CONFIG_STDOUT\x10\x02*u\n\x1bTaskExecStdioFileDescriptor\x12*\n&TASK_EXEC_STDIO_FILE_DESCRIPTOR_STDOUT\x10\x00\x12*\n&TASK_EXEC_STDIO_FILE_DESCRIPTOR_STDERR\x10\x01*]\n\x14TaskExecStdoutConfig\x12#\n\x1fTASK_EXEC_STDOUT_CONFIG_DEVNULL\x10\x00\x12 \n\x1cTASK_EXEC_STDOUT_CONFIG_PIPE\x10\x01\x32\xf0\x04\n\x11TaskCommandRouter\x12o\n\x0cTaskExecPoll\x12..modal.task_command_router.TaskExecPollRequest\x1a/.modal.task_command_router.TaskExecPollResponse\x12r\n\rTaskExecStart\x12/.modal.task_command_router.TaskExecStartRequest\x1a\x30.modal.task_command_router.TaskExecStartResponse\x12\x81\x01\n\x12TaskExecStdinWrite\x12\x34.modal.task_command_router.TaskExecStdinWriteRequest\x1a\x35.modal.task_command_router.TaskExecStdinWriteResponse\x12\x80\x01\n\x11TaskExecStdioRead\x12\x33.modal.task_command_router.TaskExecStdioReadRequest\x1a\x34.modal.task_command_router.TaskExecStdioReadResponse0\x01\x12o\n\x0cTaskExecWait\x12..modal.task_command_router.TaskExecWaitRequest\x1a/.modal.task_command_router.TaskExecWaitResponseB:Z8github.com/modal-labs/modal/go/proto/task_command_routerb\x06proto3')
|
|
20
20
|
|
|
21
21
|
_TASKEXECSTDERRCONFIG = DESCRIPTOR.enum_types_by_name['TaskExecStderrConfig']
|
|
22
22
|
TaskExecStderrConfig = enum_type_wrapper.EnumTypeWrapper(_TASKEXECSTDERRCONFIG)
|
|
@@ -113,7 +113,7 @@ TaskExecWaitResponse = _reflection.GeneratedProtocolMessageType('TaskExecWaitRes
|
|
|
113
113
|
})
|
|
114
114
|
_sym_db.RegisterMessage(TaskExecWaitResponse)
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
_TASKCOMMANDROUTER = DESCRIPTOR.services_by_name['TaskCommandRouter']
|
|
117
117
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
118
118
|
|
|
119
119
|
DESCRIPTOR._options = None
|
|
@@ -144,6 +144,6 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
144
144
|
_TASKEXECWAITREQUEST._serialized_end=1045
|
|
145
145
|
_TASKEXECWAITRESPONSE._serialized_start=1047
|
|
146
146
|
_TASKEXECWAITRESPONSE._serialized_end=1118
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
_TASKCOMMANDROUTER._serialized_start=1467
|
|
148
|
+
_TASKCOMMANDROUTER._serialized_end=2091
|
|
149
149
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -5,7 +5,7 @@ import grpc
|
|
|
5
5
|
from modal_proto import task_command_router_pb2 as modal__proto_dot_task__command__router__pb2
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
class
|
|
8
|
+
class TaskCommandRouterStub(object):
|
|
9
9
|
"""Missing associated documentation comment in .proto file."""
|
|
10
10
|
|
|
11
11
|
def __init__(self, channel):
|
|
@@ -15,33 +15,33 @@ class TaskRouterStub(object):
|
|
|
15
15
|
channel: A grpc.Channel.
|
|
16
16
|
"""
|
|
17
17
|
self.TaskExecPoll = channel.unary_unary(
|
|
18
|
-
'/modal.task_command_router.
|
|
18
|
+
'/modal.task_command_router.TaskCommandRouter/TaskExecPoll',
|
|
19
19
|
request_serializer=modal__proto_dot_task__command__router__pb2.TaskExecPollRequest.SerializeToString,
|
|
20
20
|
response_deserializer=modal__proto_dot_task__command__router__pb2.TaskExecPollResponse.FromString,
|
|
21
21
|
)
|
|
22
22
|
self.TaskExecStart = channel.unary_unary(
|
|
23
|
-
'/modal.task_command_router.
|
|
23
|
+
'/modal.task_command_router.TaskCommandRouter/TaskExecStart',
|
|
24
24
|
request_serializer=modal__proto_dot_task__command__router__pb2.TaskExecStartRequest.SerializeToString,
|
|
25
25
|
response_deserializer=modal__proto_dot_task__command__router__pb2.TaskExecStartResponse.FromString,
|
|
26
26
|
)
|
|
27
27
|
self.TaskExecStdinWrite = channel.unary_unary(
|
|
28
|
-
'/modal.task_command_router.
|
|
28
|
+
'/modal.task_command_router.TaskCommandRouter/TaskExecStdinWrite',
|
|
29
29
|
request_serializer=modal__proto_dot_task__command__router__pb2.TaskExecStdinWriteRequest.SerializeToString,
|
|
30
30
|
response_deserializer=modal__proto_dot_task__command__router__pb2.TaskExecStdinWriteResponse.FromString,
|
|
31
31
|
)
|
|
32
32
|
self.TaskExecStdioRead = channel.unary_stream(
|
|
33
|
-
'/modal.task_command_router.
|
|
33
|
+
'/modal.task_command_router.TaskCommandRouter/TaskExecStdioRead',
|
|
34
34
|
request_serializer=modal__proto_dot_task__command__router__pb2.TaskExecStdioReadRequest.SerializeToString,
|
|
35
35
|
response_deserializer=modal__proto_dot_task__command__router__pb2.TaskExecStdioReadResponse.FromString,
|
|
36
36
|
)
|
|
37
37
|
self.TaskExecWait = channel.unary_unary(
|
|
38
|
-
'/modal.task_command_router.
|
|
38
|
+
'/modal.task_command_router.TaskCommandRouter/TaskExecWait',
|
|
39
39
|
request_serializer=modal__proto_dot_task__command__router__pb2.TaskExecWaitRequest.SerializeToString,
|
|
40
40
|
response_deserializer=modal__proto_dot_task__command__router__pb2.TaskExecWaitResponse.FromString,
|
|
41
41
|
)
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
class
|
|
44
|
+
class TaskCommandRouterServicer(object):
|
|
45
45
|
"""Missing associated documentation comment in .proto file."""
|
|
46
46
|
|
|
47
47
|
def TaskExecPoll(self, request, context):
|
|
@@ -80,7 +80,7 @@ class TaskRouterServicer(object):
|
|
|
80
80
|
raise NotImplementedError('Method not implemented!')
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
def
|
|
83
|
+
def add_TaskCommandRouterServicer_to_server(servicer, server):
|
|
84
84
|
rpc_method_handlers = {
|
|
85
85
|
'TaskExecPoll': grpc.unary_unary_rpc_method_handler(
|
|
86
86
|
servicer.TaskExecPoll,
|
|
@@ -109,12 +109,12 @@ def add_TaskRouterServicer_to_server(servicer, server):
|
|
|
109
109
|
),
|
|
110
110
|
}
|
|
111
111
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
112
|
-
'modal.task_command_router.
|
|
112
|
+
'modal.task_command_router.TaskCommandRouter', rpc_method_handlers)
|
|
113
113
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
114
114
|
|
|
115
115
|
|
|
116
116
|
# This class is part of an EXPERIMENTAL API.
|
|
117
|
-
class
|
|
117
|
+
class TaskCommandRouter(object):
|
|
118
118
|
"""Missing associated documentation comment in .proto file."""
|
|
119
119
|
|
|
120
120
|
@staticmethod
|
|
@@ -128,7 +128,7 @@ class TaskRouter(object):
|
|
|
128
128
|
wait_for_ready=None,
|
|
129
129
|
timeout=None,
|
|
130
130
|
metadata=None):
|
|
131
|
-
return grpc.experimental.unary_unary(request, target, '/modal.task_command_router.
|
|
131
|
+
return grpc.experimental.unary_unary(request, target, '/modal.task_command_router.TaskCommandRouter/TaskExecPoll',
|
|
132
132
|
modal__proto_dot_task__command__router__pb2.TaskExecPollRequest.SerializeToString,
|
|
133
133
|
modal__proto_dot_task__command__router__pb2.TaskExecPollResponse.FromString,
|
|
134
134
|
options, channel_credentials,
|
|
@@ -145,7 +145,7 @@ class TaskRouter(object):
|
|
|
145
145
|
wait_for_ready=None,
|
|
146
146
|
timeout=None,
|
|
147
147
|
metadata=None):
|
|
148
|
-
return grpc.experimental.unary_unary(request, target, '/modal.task_command_router.
|
|
148
|
+
return grpc.experimental.unary_unary(request, target, '/modal.task_command_router.TaskCommandRouter/TaskExecStart',
|
|
149
149
|
modal__proto_dot_task__command__router__pb2.TaskExecStartRequest.SerializeToString,
|
|
150
150
|
modal__proto_dot_task__command__router__pb2.TaskExecStartResponse.FromString,
|
|
151
151
|
options, channel_credentials,
|
|
@@ -162,7 +162,7 @@ class TaskRouter(object):
|
|
|
162
162
|
wait_for_ready=None,
|
|
163
163
|
timeout=None,
|
|
164
164
|
metadata=None):
|
|
165
|
-
return grpc.experimental.unary_unary(request, target, '/modal.task_command_router.
|
|
165
|
+
return grpc.experimental.unary_unary(request, target, '/modal.task_command_router.TaskCommandRouter/TaskExecStdinWrite',
|
|
166
166
|
modal__proto_dot_task__command__router__pb2.TaskExecStdinWriteRequest.SerializeToString,
|
|
167
167
|
modal__proto_dot_task__command__router__pb2.TaskExecStdinWriteResponse.FromString,
|
|
168
168
|
options, channel_credentials,
|
|
@@ -179,7 +179,7 @@ class TaskRouter(object):
|
|
|
179
179
|
wait_for_ready=None,
|
|
180
180
|
timeout=None,
|
|
181
181
|
metadata=None):
|
|
182
|
-
return grpc.experimental.unary_stream(request, target, '/modal.task_command_router.
|
|
182
|
+
return grpc.experimental.unary_stream(request, target, '/modal.task_command_router.TaskCommandRouter/TaskExecStdioRead',
|
|
183
183
|
modal__proto_dot_task__command__router__pb2.TaskExecStdioReadRequest.SerializeToString,
|
|
184
184
|
modal__proto_dot_task__command__router__pb2.TaskExecStdioReadResponse.FromString,
|
|
185
185
|
options, channel_credentials,
|
|
@@ -196,7 +196,7 @@ class TaskRouter(object):
|
|
|
196
196
|
wait_for_ready=None,
|
|
197
197
|
timeout=None,
|
|
198
198
|
metadata=None):
|
|
199
|
-
return grpc.experimental.unary_unary(request, target, '/modal.task_command_router.
|
|
199
|
+
return grpc.experimental.unary_unary(request, target, '/modal.task_command_router.TaskCommandRouter/TaskExecWait',
|
|
200
200
|
modal__proto_dot_task__command__router__pb2.TaskExecWaitRequest.SerializeToString,
|
|
201
201
|
modal__proto_dot_task__command__router__pb2.TaskExecWaitResponse.FromString,
|
|
202
202
|
options, channel_credentials,
|
|
@@ -7,7 +7,7 @@ import collections.abc
|
|
|
7
7
|
import grpc
|
|
8
8
|
import modal_proto.task_command_router_pb2
|
|
9
9
|
|
|
10
|
-
class
|
|
10
|
+
class TaskCommandRouterStub:
|
|
11
11
|
def __init__(self, channel: grpc.Channel) -> None: ...
|
|
12
12
|
TaskExecPoll: grpc.UnaryUnaryMultiCallable[
|
|
13
13
|
modal_proto.task_command_router_pb2.TaskExecPollRequest,
|
|
@@ -35,7 +35,7 @@ class TaskRouterStub:
|
|
|
35
35
|
]
|
|
36
36
|
"""Wait for an exec'd command to exit and return the exit code."""
|
|
37
37
|
|
|
38
|
-
class
|
|
38
|
+
class TaskCommandRouterServicer(metaclass=abc.ABCMeta):
|
|
39
39
|
@abc.abstractmethod
|
|
40
40
|
def TaskExecPoll(
|
|
41
41
|
self,
|
|
@@ -72,4 +72,4 @@ class TaskRouterServicer(metaclass=abc.ABCMeta):
|
|
|
72
72
|
) -> modal_proto.task_command_router_pb2.TaskExecWaitResponse:
|
|
73
73
|
"""Wait for an exec'd command to exit and return the exit code."""
|
|
74
74
|
|
|
75
|
-
def
|
|
75
|
+
def add_TaskCommandRouterServicer_to_server(servicer: TaskCommandRouterServicer, server: grpc.Server) -> None: ...
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|