modal 1.1.5.dev66__py3-none-any.whl → 1.3.1.dev8__py3-none-any.whl
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/__init__.py +4 -4
- modal/__main__.py +4 -29
- modal/_billing.py +84 -0
- modal/_clustered_functions.py +1 -3
- modal/_container_entrypoint.py +33 -208
- modal/_functions.py +171 -138
- modal/_grpc_client.py +191 -0
- modal/_ipython.py +16 -6
- modal/_load_context.py +106 -0
- modal/_object.py +72 -21
- modal/_output.py +12 -14
- modal/_partial_function.py +31 -4
- modal/_resolver.py +44 -57
- modal/_runtime/container_io_manager.py +30 -28
- modal/_runtime/container_io_manager.pyi +42 -44
- modal/_runtime/gpu_memory_snapshot.py +9 -7
- modal/_runtime/user_code_event_loop.py +80 -0
- modal/_runtime/user_code_imports.py +236 -10
- modal/_serialization.py +2 -1
- modal/_traceback.py +4 -13
- modal/_tunnel.py +16 -11
- modal/_tunnel.pyi +25 -3
- modal/_utils/async_utils.py +337 -10
- modal/_utils/auth_token_manager.py +1 -4
- modal/_utils/blob_utils.py +29 -22
- modal/_utils/function_utils.py +20 -21
- modal/_utils/grpc_testing.py +6 -3
- modal/_utils/grpc_utils.py +223 -64
- modal/_utils/mount_utils.py +26 -1
- modal/_utils/name_utils.py +2 -3
- modal/_utils/package_utils.py +0 -1
- modal/_utils/rand_pb_testing.py +8 -1
- modal/_utils/task_command_router_client.py +524 -0
- modal/_vendor/cloudpickle.py +144 -48
- modal/app.py +285 -105
- modal/app.pyi +216 -53
- modal/billing.py +5 -0
- modal/builder/2025.06.txt +6 -3
- modal/builder/PREVIEW.txt +2 -1
- modal/builder/base-images.json +4 -2
- modal/cli/_download.py +19 -3
- modal/cli/cluster.py +4 -2
- modal/cli/config.py +3 -1
- modal/cli/container.py +5 -4
- modal/cli/dict.py +5 -2
- modal/cli/entry_point.py +26 -2
- modal/cli/environment.py +2 -16
- modal/cli/launch.py +1 -76
- modal/cli/network_file_system.py +5 -20
- modal/cli/programs/run_jupyter.py +1 -1
- modal/cli/programs/vscode.py +1 -1
- modal/cli/queues.py +5 -4
- modal/cli/run.py +24 -204
- modal/cli/secret.py +1 -2
- modal/cli/shell.py +375 -0
- modal/cli/utils.py +1 -13
- modal/cli/volume.py +11 -17
- modal/client.py +16 -125
- modal/client.pyi +94 -144
- modal/cloud_bucket_mount.py +3 -1
- modal/cloud_bucket_mount.pyi +4 -0
- modal/cls.py +101 -64
- modal/cls.pyi +9 -8
- modal/config.py +21 -1
- modal/container_process.py +288 -12
- modal/container_process.pyi +99 -38
- modal/dict.py +72 -33
- modal/dict.pyi +88 -57
- modal/environments.py +16 -8
- modal/environments.pyi +6 -2
- modal/exception.py +154 -16
- modal/experimental/__init__.py +24 -53
- modal/experimental/flash.py +161 -74
- modal/experimental/flash.pyi +97 -49
- modal/file_io.py +50 -92
- modal/file_io.pyi +117 -89
- modal/functions.pyi +70 -87
- modal/image.py +82 -47
- modal/image.pyi +51 -30
- modal/io_streams.py +500 -149
- modal/io_streams.pyi +279 -189
- modal/mount.py +60 -46
- modal/mount.pyi +41 -17
- modal/network_file_system.py +19 -11
- modal/network_file_system.pyi +72 -39
- modal/object.pyi +114 -22
- modal/parallel_map.py +42 -44
- modal/parallel_map.pyi +9 -17
- modal/partial_function.pyi +4 -2
- modal/proxy.py +14 -6
- modal/proxy.pyi +10 -2
- modal/queue.py +45 -38
- modal/queue.pyi +88 -52
- modal/runner.py +96 -96
- modal/runner.pyi +44 -27
- modal/sandbox.py +225 -107
- modal/sandbox.pyi +226 -60
- modal/secret.py +58 -56
- modal/secret.pyi +28 -13
- modal/serving.py +7 -11
- modal/serving.pyi +7 -8
- modal/snapshot.py +29 -15
- modal/snapshot.pyi +18 -10
- modal/token_flow.py +1 -1
- modal/token_flow.pyi +4 -6
- modal/volume.py +102 -55
- modal/volume.pyi +125 -66
- {modal-1.1.5.dev66.dist-info → modal-1.3.1.dev8.dist-info}/METADATA +10 -9
- modal-1.3.1.dev8.dist-info/RECORD +189 -0
- modal_proto/api.proto +141 -70
- modal_proto/api_grpc.py +42 -26
- modal_proto/api_pb2.py +1123 -1103
- modal_proto/api_pb2.pyi +331 -83
- modal_proto/api_pb2_grpc.py +80 -48
- modal_proto/api_pb2_grpc.pyi +26 -18
- modal_proto/modal_api_grpc.py +175 -174
- modal_proto/task_command_router.proto +164 -0
- modal_proto/task_command_router_grpc.py +138 -0
- modal_proto/task_command_router_pb2.py +180 -0
- modal_proto/{sandbox_router_pb2.pyi → task_command_router_pb2.pyi} +148 -57
- modal_proto/task_command_router_pb2_grpc.py +272 -0
- modal_proto/task_command_router_pb2_grpc.pyi +100 -0
- modal_version/__init__.py +1 -1
- modal_version/__main__.py +1 -1
- modal/cli/programs/launch_instance_ssh.py +0 -94
- modal/cli/programs/run_marimo.py +0 -95
- modal-1.1.5.dev66.dist-info/RECORD +0 -191
- modal_proto/modal_options_grpc.py +0 -3
- modal_proto/options.proto +0 -19
- modal_proto/options_grpc.py +0 -3
- modal_proto/options_pb2.py +0 -35
- modal_proto/options_pb2.pyi +0 -20
- modal_proto/options_pb2_grpc.py +0 -4
- modal_proto/options_pb2_grpc.pyi +0 -7
- modal_proto/sandbox_router.proto +0 -125
- modal_proto/sandbox_router_grpc.py +0 -89
- modal_proto/sandbox_router_pb2.py +0 -128
- modal_proto/sandbox_router_pb2_grpc.py +0 -169
- modal_proto/sandbox_router_pb2_grpc.pyi +0 -63
- {modal-1.1.5.dev66.dist-info → modal-1.3.1.dev8.dist-info}/WHEEL +0 -0
- {modal-1.1.5.dev66.dist-info → modal-1.3.1.dev8.dist-info}/entry_points.txt +0 -0
- {modal-1.1.5.dev66.dist-info → modal-1.3.1.dev8.dist-info}/licenses/LICENSE +0 -0
- {modal-1.1.5.dev66.dist-info → modal-1.3.1.dev8.dist-info}/top_level.txt +0 -0
modal_proto/sandbox_router.proto
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
import "modal_proto/api.proto";
|
|
4
|
-
|
|
5
|
-
package modal.sandbox_router;
|
|
6
|
-
|
|
7
|
-
enum SandboxExecStderrConfig {
|
|
8
|
-
// The output will be discarded.
|
|
9
|
-
SANDBOX_EXEC_STDERR_CONFIG_DEVNULL = 0;
|
|
10
|
-
// The output will be streamed to the client.
|
|
11
|
-
SANDBOX_EXEC_STDERR_CONFIG_PIPE = 1;
|
|
12
|
-
// A special value that can be used to indicate that the stderr stream should
|
|
13
|
-
// be merged with the stdout stream.
|
|
14
|
-
SANDBOX_EXEC_STDERR_CONFIG_STDOUT = 2;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
enum SandboxExecStdioFileDescriptor {
|
|
18
|
-
// Read from stdout.
|
|
19
|
-
SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDOUT = 0;
|
|
20
|
-
// Read from stderr.
|
|
21
|
-
SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDERR = 1;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
enum SandboxExecStdoutConfig {
|
|
25
|
-
// The output will be discarded.
|
|
26
|
-
SANDBOX_EXEC_STDOUT_CONFIG_DEVNULL = 0;
|
|
27
|
-
// The output will be streamed to the client.
|
|
28
|
-
SANDBOX_EXEC_STDOUT_CONFIG_PIPE = 1;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
message SandboxExecStartRequest {
|
|
32
|
-
// The task ID of the sandbox to execute the command in.
|
|
33
|
-
string task_id = 1;
|
|
34
|
-
// Execution ID. This ID will be used to identify the execution for other
|
|
35
|
-
// requests and ensure exec commands are idempotent.
|
|
36
|
-
//
|
|
37
|
-
// TODO(saltzm): Could instead have a separate idempotency key from the exec_id
|
|
38
|
-
// like present day, and have the server generate the exec_id and return it in
|
|
39
|
-
// the ExecStartResponse.
|
|
40
|
-
string exec_id = 2;
|
|
41
|
-
// Command arguments to execute.
|
|
42
|
-
repeated string command_args= 3;
|
|
43
|
-
// Configures how the stdout of the command will be handled.
|
|
44
|
-
SandboxExecStdoutConfig stdout_config = 4;
|
|
45
|
-
// Configures how the stderr of the command will be handled.
|
|
46
|
-
SandboxExecStderrConfig stderr_config = 5;
|
|
47
|
-
// Timeout in seconds for the exec'd command to exit. If the command does not
|
|
48
|
-
// exit within this duration, the command will be killed. This is NOT the
|
|
49
|
-
// timeout for the ExecStartRequest RPC to complete.
|
|
50
|
-
optional uint32 timeout_secs = 6;
|
|
51
|
-
// Working directory for the command.
|
|
52
|
-
optional string workdir = 7;
|
|
53
|
-
// Secret IDs to mount into the sandbox.
|
|
54
|
-
repeated string secret_ids = 8;
|
|
55
|
-
// PTY info for the command.
|
|
56
|
-
optional modal.client.PTYInfo pty_info = 9;
|
|
57
|
-
// Enable debugging capabilities on the container runtime. Used only for
|
|
58
|
-
// internal debugging.
|
|
59
|
-
bool runtime_debug = 10;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
message SandboxExecStartResponse { }
|
|
63
|
-
|
|
64
|
-
message SandboxExecStdinWriteRequest {
|
|
65
|
-
// The task ID of the sandbox running the exec'd command.
|
|
66
|
-
string task_id = 1;
|
|
67
|
-
// The execution ID of the command to write to.
|
|
68
|
-
string exec_id = 2;
|
|
69
|
-
// The offset to start writing to. This is used to resume writing from the
|
|
70
|
-
// last write position if the connection is closed and reopened.
|
|
71
|
-
uint64 offset = 3;
|
|
72
|
-
bytes data = 4;
|
|
73
|
-
// If true, close the stdin stream after writing any provided data.
|
|
74
|
-
// This signals EOF to the exec'd process.
|
|
75
|
-
bool eof = 5;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
message SandboxExecStdinWriteResponse { }
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
message SandboxExecStdioReadRequest {
|
|
82
|
-
// The task ID of the sandbox running the exec'd command.
|
|
83
|
-
string task_id = 1;
|
|
84
|
-
// The execution ID of the command to read from.
|
|
85
|
-
string exec_id = 2;
|
|
86
|
-
// The offset to start reading from. This is used to resume reading from the
|
|
87
|
-
// last read position if the connection is closed and reopened.
|
|
88
|
-
uint64 offset = 3;
|
|
89
|
-
// Which file descriptor to read from.
|
|
90
|
-
SandboxExecStdioFileDescriptor file_descriptor = 4;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
message SandboxExecStdioReadResponse {
|
|
94
|
-
// The data read from the file descriptor.
|
|
95
|
-
bytes data = 1;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
message SandboxExecWaitRequest {
|
|
99
|
-
// The task ID of the sandbox running the exec'd command.
|
|
100
|
-
string task_id = 1;
|
|
101
|
-
// The execution ID of the command to wait on.
|
|
102
|
-
string exec_id = 2;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
message SandboxExecWaitResponse {
|
|
106
|
-
oneof exit_status {
|
|
107
|
-
// The exit code of the command.
|
|
108
|
-
int32 code = 3;
|
|
109
|
-
// The signal that terminated the command.
|
|
110
|
-
int32 signal = 4;
|
|
111
|
-
}
|
|
112
|
-
// TODO(saltzm): Give a way for the user to distinguish between normal exit
|
|
113
|
-
// and termination by Modal (due to sandbox timeout, exec exceeded deadline, etc.)
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
service SandboxRouter {
|
|
117
|
-
// Execute a command in the sandbox.
|
|
118
|
-
rpc SandboxExecStart(SandboxExecStartRequest) returns (SandboxExecStartResponse);
|
|
119
|
-
// Write to the stdin stream of an exec'd command.
|
|
120
|
-
rpc SandboxExecStdinWrite(SandboxExecStdinWriteRequest) returns (SandboxExecStdinWriteResponse);
|
|
121
|
-
// Get a stream of output from the stdout or stderr stream of an exec'd command.
|
|
122
|
-
rpc SandboxExecStdioRead(SandboxExecStdioReadRequest) returns (stream SandboxExecStdioReadResponse);
|
|
123
|
-
// Wait for an exec'd command to exit and return the exit code.
|
|
124
|
-
rpc SandboxExecWait(SandboxExecWaitRequest) returns (SandboxExecWaitResponse);
|
|
125
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
# Generated by the Protocol Buffers compiler. DO NOT EDIT!
|
|
2
|
-
# source: modal_proto/sandbox_router.proto
|
|
3
|
-
# plugin: grpclib.plugin.main
|
|
4
|
-
import abc
|
|
5
|
-
import typing
|
|
6
|
-
|
|
7
|
-
import grpclib.const
|
|
8
|
-
import grpclib.client
|
|
9
|
-
if typing.TYPE_CHECKING:
|
|
10
|
-
import grpclib.server
|
|
11
|
-
|
|
12
|
-
import modal_proto.api_pb2
|
|
13
|
-
import modal_proto.sandbox_router_pb2
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class SandboxRouterBase(abc.ABC):
|
|
17
|
-
|
|
18
|
-
@abc.abstractmethod
|
|
19
|
-
async def SandboxExecStart(self, stream: 'grpclib.server.Stream[modal_proto.sandbox_router_pb2.SandboxExecStartRequest, modal_proto.sandbox_router_pb2.SandboxExecStartResponse]') -> None:
|
|
20
|
-
pass
|
|
21
|
-
|
|
22
|
-
@abc.abstractmethod
|
|
23
|
-
async def SandboxExecStdinWrite(self, stream: 'grpclib.server.Stream[modal_proto.sandbox_router_pb2.SandboxExecStdinWriteRequest, modal_proto.sandbox_router_pb2.SandboxExecStdinWriteResponse]') -> None:
|
|
24
|
-
pass
|
|
25
|
-
|
|
26
|
-
@abc.abstractmethod
|
|
27
|
-
async def SandboxExecStdioRead(self, stream: 'grpclib.server.Stream[modal_proto.sandbox_router_pb2.SandboxExecStdioReadRequest, modal_proto.sandbox_router_pb2.SandboxExecStdioReadResponse]') -> None:
|
|
28
|
-
pass
|
|
29
|
-
|
|
30
|
-
@abc.abstractmethod
|
|
31
|
-
async def SandboxExecWait(self, stream: 'grpclib.server.Stream[modal_proto.sandbox_router_pb2.SandboxExecWaitRequest, modal_proto.sandbox_router_pb2.SandboxExecWaitResponse]') -> None:
|
|
32
|
-
pass
|
|
33
|
-
|
|
34
|
-
def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
|
|
35
|
-
return {
|
|
36
|
-
'/modal.sandbox_router.SandboxRouter/SandboxExecStart': grpclib.const.Handler(
|
|
37
|
-
self.SandboxExecStart,
|
|
38
|
-
grpclib.const.Cardinality.UNARY_UNARY,
|
|
39
|
-
modal_proto.sandbox_router_pb2.SandboxExecStartRequest,
|
|
40
|
-
modal_proto.sandbox_router_pb2.SandboxExecStartResponse,
|
|
41
|
-
),
|
|
42
|
-
'/modal.sandbox_router.SandboxRouter/SandboxExecStdinWrite': grpclib.const.Handler(
|
|
43
|
-
self.SandboxExecStdinWrite,
|
|
44
|
-
grpclib.const.Cardinality.UNARY_UNARY,
|
|
45
|
-
modal_proto.sandbox_router_pb2.SandboxExecStdinWriteRequest,
|
|
46
|
-
modal_proto.sandbox_router_pb2.SandboxExecStdinWriteResponse,
|
|
47
|
-
),
|
|
48
|
-
'/modal.sandbox_router.SandboxRouter/SandboxExecStdioRead': grpclib.const.Handler(
|
|
49
|
-
self.SandboxExecStdioRead,
|
|
50
|
-
grpclib.const.Cardinality.UNARY_STREAM,
|
|
51
|
-
modal_proto.sandbox_router_pb2.SandboxExecStdioReadRequest,
|
|
52
|
-
modal_proto.sandbox_router_pb2.SandboxExecStdioReadResponse,
|
|
53
|
-
),
|
|
54
|
-
'/modal.sandbox_router.SandboxRouter/SandboxExecWait': grpclib.const.Handler(
|
|
55
|
-
self.SandboxExecWait,
|
|
56
|
-
grpclib.const.Cardinality.UNARY_UNARY,
|
|
57
|
-
modal_proto.sandbox_router_pb2.SandboxExecWaitRequest,
|
|
58
|
-
modal_proto.sandbox_router_pb2.SandboxExecWaitResponse,
|
|
59
|
-
),
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
class SandboxRouterStub:
|
|
64
|
-
|
|
65
|
-
def __init__(self, channel: grpclib.client.Channel) -> None:
|
|
66
|
-
self.SandboxExecStart = grpclib.client.UnaryUnaryMethod(
|
|
67
|
-
channel,
|
|
68
|
-
'/modal.sandbox_router.SandboxRouter/SandboxExecStart',
|
|
69
|
-
modal_proto.sandbox_router_pb2.SandboxExecStartRequest,
|
|
70
|
-
modal_proto.sandbox_router_pb2.SandboxExecStartResponse,
|
|
71
|
-
)
|
|
72
|
-
self.SandboxExecStdinWrite = grpclib.client.UnaryUnaryMethod(
|
|
73
|
-
channel,
|
|
74
|
-
'/modal.sandbox_router.SandboxRouter/SandboxExecStdinWrite',
|
|
75
|
-
modal_proto.sandbox_router_pb2.SandboxExecStdinWriteRequest,
|
|
76
|
-
modal_proto.sandbox_router_pb2.SandboxExecStdinWriteResponse,
|
|
77
|
-
)
|
|
78
|
-
self.SandboxExecStdioRead = grpclib.client.UnaryStreamMethod(
|
|
79
|
-
channel,
|
|
80
|
-
'/modal.sandbox_router.SandboxRouter/SandboxExecStdioRead',
|
|
81
|
-
modal_proto.sandbox_router_pb2.SandboxExecStdioReadRequest,
|
|
82
|
-
modal_proto.sandbox_router_pb2.SandboxExecStdioReadResponse,
|
|
83
|
-
)
|
|
84
|
-
self.SandboxExecWait = grpclib.client.UnaryUnaryMethod(
|
|
85
|
-
channel,
|
|
86
|
-
'/modal.sandbox_router.SandboxRouter/SandboxExecWait',
|
|
87
|
-
modal_proto.sandbox_router_pb2.SandboxExecWaitRequest,
|
|
88
|
-
modal_proto.sandbox_router_pb2.SandboxExecWaitResponse,
|
|
89
|
-
)
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
-
# source: modal_proto/sandbox_router.proto
|
|
4
|
-
"""Generated protocol buffer code."""
|
|
5
|
-
from google.protobuf.internal import enum_type_wrapper
|
|
6
|
-
from google.protobuf import descriptor as _descriptor
|
|
7
|
-
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
-
from google.protobuf import message as _message
|
|
9
|
-
from google.protobuf import reflection as _reflection
|
|
10
|
-
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
-
# @@protoc_insertion_point(imports)
|
|
12
|
-
|
|
13
|
-
_sym_db = _symbol_database.Default()
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
from modal_proto import api_pb2 as modal__proto_dot_api__pb2
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n modal_proto/sandbox_router.proto\x12\x14modal.sandbox_router\x1a\x15modal_proto/api.proto\"\x91\x03\n\x17SandboxExecStartRequest\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\x44\n\rstdout_config\x18\x04 \x01(\x0e\x32-.modal.sandbox_router.SandboxExecStdoutConfig\x12\x44\n\rstderr_config\x18\x05 \x01(\x0e\x32-.modal.sandbox_router.SandboxExecStderrConfig\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\"\x1a\n\x18SandboxExecStartResponse\"k\n\x1cSandboxExecStdinWriteRequest\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\"\x1f\n\x1dSandboxExecStdinWriteResponse\"\x9e\x01\n\x1bSandboxExecStdioReadRequest\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\x12M\n\x0f\x66ile_descriptor\x18\x04 \x01(\x0e\x32\x34.modal.sandbox_router.SandboxExecStdioFileDescriptor\",\n\x1cSandboxExecStdioReadResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\":\n\x16SandboxExecWaitRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\"J\n\x17SandboxExecWaitResponse\x12\x0e\n\x04\x63ode\x18\x03 \x01(\x05H\x00\x12\x10\n\x06signal\x18\x04 \x01(\x05H\x00\x42\r\n\x0b\x65xit_status*\x8d\x01\n\x17SandboxExecStderrConfig\x12&\n\"SANDBOX_EXEC_STDERR_CONFIG_DEVNULL\x10\x00\x12#\n\x1fSANDBOX_EXEC_STDERR_CONFIG_PIPE\x10\x01\x12%\n!SANDBOX_EXEC_STDERR_CONFIG_STDOUT\x10\x02*~\n\x1eSandboxExecStdioFileDescriptor\x12-\n)SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDOUT\x10\x00\x12-\n)SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDERR\x10\x01*f\n\x17SandboxExecStdoutConfig\x12&\n\"SANDBOX_EXEC_STDOUT_CONFIG_DEVNULL\x10\x00\x12#\n\x1fSANDBOX_EXEC_STDOUT_CONFIG_PIPE\x10\x01\x32\xf6\x03\n\rSandboxRouter\x12q\n\x10SandboxExecStart\x12-.modal.sandbox_router.SandboxExecStartRequest\x1a..modal.sandbox_router.SandboxExecStartResponse\x12\x80\x01\n\x15SandboxExecStdinWrite\x12\x32.modal.sandbox_router.SandboxExecStdinWriteRequest\x1a\x33.modal.sandbox_router.SandboxExecStdinWriteResponse\x12\x7f\n\x14SandboxExecStdioRead\x12\x31.modal.sandbox_router.SandboxExecStdioReadRequest\x1a\x32.modal.sandbox_router.SandboxExecStdioReadResponse0\x01\x12n\n\x0fSandboxExecWait\x12,.modal.sandbox_router.SandboxExecWaitRequest\x1a-.modal.sandbox_router.SandboxExecWaitResponseb\x06proto3')
|
|
20
|
-
|
|
21
|
-
_SANDBOXEXECSTDERRCONFIG = DESCRIPTOR.enum_types_by_name['SandboxExecStderrConfig']
|
|
22
|
-
SandboxExecStderrConfig = enum_type_wrapper.EnumTypeWrapper(_SANDBOXEXECSTDERRCONFIG)
|
|
23
|
-
_SANDBOXEXECSTDIOFILEDESCRIPTOR = DESCRIPTOR.enum_types_by_name['SandboxExecStdioFileDescriptor']
|
|
24
|
-
SandboxExecStdioFileDescriptor = enum_type_wrapper.EnumTypeWrapper(_SANDBOXEXECSTDIOFILEDESCRIPTOR)
|
|
25
|
-
_SANDBOXEXECSTDOUTCONFIG = DESCRIPTOR.enum_types_by_name['SandboxExecStdoutConfig']
|
|
26
|
-
SandboxExecStdoutConfig = enum_type_wrapper.EnumTypeWrapper(_SANDBOXEXECSTDOUTCONFIG)
|
|
27
|
-
SANDBOX_EXEC_STDERR_CONFIG_DEVNULL = 0
|
|
28
|
-
SANDBOX_EXEC_STDERR_CONFIG_PIPE = 1
|
|
29
|
-
SANDBOX_EXEC_STDERR_CONFIG_STDOUT = 2
|
|
30
|
-
SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDOUT = 0
|
|
31
|
-
SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDERR = 1
|
|
32
|
-
SANDBOX_EXEC_STDOUT_CONFIG_DEVNULL = 0
|
|
33
|
-
SANDBOX_EXEC_STDOUT_CONFIG_PIPE = 1
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
_SANDBOXEXECSTARTREQUEST = DESCRIPTOR.message_types_by_name['SandboxExecStartRequest']
|
|
37
|
-
_SANDBOXEXECSTARTRESPONSE = DESCRIPTOR.message_types_by_name['SandboxExecStartResponse']
|
|
38
|
-
_SANDBOXEXECSTDINWRITEREQUEST = DESCRIPTOR.message_types_by_name['SandboxExecStdinWriteRequest']
|
|
39
|
-
_SANDBOXEXECSTDINWRITERESPONSE = DESCRIPTOR.message_types_by_name['SandboxExecStdinWriteResponse']
|
|
40
|
-
_SANDBOXEXECSTDIOREADREQUEST = DESCRIPTOR.message_types_by_name['SandboxExecStdioReadRequest']
|
|
41
|
-
_SANDBOXEXECSTDIOREADRESPONSE = DESCRIPTOR.message_types_by_name['SandboxExecStdioReadResponse']
|
|
42
|
-
_SANDBOXEXECWAITREQUEST = DESCRIPTOR.message_types_by_name['SandboxExecWaitRequest']
|
|
43
|
-
_SANDBOXEXECWAITRESPONSE = DESCRIPTOR.message_types_by_name['SandboxExecWaitResponse']
|
|
44
|
-
SandboxExecStartRequest = _reflection.GeneratedProtocolMessageType('SandboxExecStartRequest', (_message.Message,), {
|
|
45
|
-
'DESCRIPTOR' : _SANDBOXEXECSTARTREQUEST,
|
|
46
|
-
'__module__' : 'modal_proto.sandbox_router_pb2'
|
|
47
|
-
# @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecStartRequest)
|
|
48
|
-
})
|
|
49
|
-
_sym_db.RegisterMessage(SandboxExecStartRequest)
|
|
50
|
-
|
|
51
|
-
SandboxExecStartResponse = _reflection.GeneratedProtocolMessageType('SandboxExecStartResponse', (_message.Message,), {
|
|
52
|
-
'DESCRIPTOR' : _SANDBOXEXECSTARTRESPONSE,
|
|
53
|
-
'__module__' : 'modal_proto.sandbox_router_pb2'
|
|
54
|
-
# @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecStartResponse)
|
|
55
|
-
})
|
|
56
|
-
_sym_db.RegisterMessage(SandboxExecStartResponse)
|
|
57
|
-
|
|
58
|
-
SandboxExecStdinWriteRequest = _reflection.GeneratedProtocolMessageType('SandboxExecStdinWriteRequest', (_message.Message,), {
|
|
59
|
-
'DESCRIPTOR' : _SANDBOXEXECSTDINWRITEREQUEST,
|
|
60
|
-
'__module__' : 'modal_proto.sandbox_router_pb2'
|
|
61
|
-
# @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecStdinWriteRequest)
|
|
62
|
-
})
|
|
63
|
-
_sym_db.RegisterMessage(SandboxExecStdinWriteRequest)
|
|
64
|
-
|
|
65
|
-
SandboxExecStdinWriteResponse = _reflection.GeneratedProtocolMessageType('SandboxExecStdinWriteResponse', (_message.Message,), {
|
|
66
|
-
'DESCRIPTOR' : _SANDBOXEXECSTDINWRITERESPONSE,
|
|
67
|
-
'__module__' : 'modal_proto.sandbox_router_pb2'
|
|
68
|
-
# @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecStdinWriteResponse)
|
|
69
|
-
})
|
|
70
|
-
_sym_db.RegisterMessage(SandboxExecStdinWriteResponse)
|
|
71
|
-
|
|
72
|
-
SandboxExecStdioReadRequest = _reflection.GeneratedProtocolMessageType('SandboxExecStdioReadRequest', (_message.Message,), {
|
|
73
|
-
'DESCRIPTOR' : _SANDBOXEXECSTDIOREADREQUEST,
|
|
74
|
-
'__module__' : 'modal_proto.sandbox_router_pb2'
|
|
75
|
-
# @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecStdioReadRequest)
|
|
76
|
-
})
|
|
77
|
-
_sym_db.RegisterMessage(SandboxExecStdioReadRequest)
|
|
78
|
-
|
|
79
|
-
SandboxExecStdioReadResponse = _reflection.GeneratedProtocolMessageType('SandboxExecStdioReadResponse', (_message.Message,), {
|
|
80
|
-
'DESCRIPTOR' : _SANDBOXEXECSTDIOREADRESPONSE,
|
|
81
|
-
'__module__' : 'modal_proto.sandbox_router_pb2'
|
|
82
|
-
# @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecStdioReadResponse)
|
|
83
|
-
})
|
|
84
|
-
_sym_db.RegisterMessage(SandboxExecStdioReadResponse)
|
|
85
|
-
|
|
86
|
-
SandboxExecWaitRequest = _reflection.GeneratedProtocolMessageType('SandboxExecWaitRequest', (_message.Message,), {
|
|
87
|
-
'DESCRIPTOR' : _SANDBOXEXECWAITREQUEST,
|
|
88
|
-
'__module__' : 'modal_proto.sandbox_router_pb2'
|
|
89
|
-
# @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecWaitRequest)
|
|
90
|
-
})
|
|
91
|
-
_sym_db.RegisterMessage(SandboxExecWaitRequest)
|
|
92
|
-
|
|
93
|
-
SandboxExecWaitResponse = _reflection.GeneratedProtocolMessageType('SandboxExecWaitResponse', (_message.Message,), {
|
|
94
|
-
'DESCRIPTOR' : _SANDBOXEXECWAITRESPONSE,
|
|
95
|
-
'__module__' : 'modal_proto.sandbox_router_pb2'
|
|
96
|
-
# @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecWaitResponse)
|
|
97
|
-
})
|
|
98
|
-
_sym_db.RegisterMessage(SandboxExecWaitResponse)
|
|
99
|
-
|
|
100
|
-
_SANDBOXROUTER = DESCRIPTOR.services_by_name['SandboxRouter']
|
|
101
|
-
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
102
|
-
|
|
103
|
-
DESCRIPTOR._options = None
|
|
104
|
-
_SANDBOXEXECSTDERRCONFIG._serialized_start=999
|
|
105
|
-
_SANDBOXEXECSTDERRCONFIG._serialized_end=1140
|
|
106
|
-
_SANDBOXEXECSTDIOFILEDESCRIPTOR._serialized_start=1142
|
|
107
|
-
_SANDBOXEXECSTDIOFILEDESCRIPTOR._serialized_end=1268
|
|
108
|
-
_SANDBOXEXECSTDOUTCONFIG._serialized_start=1270
|
|
109
|
-
_SANDBOXEXECSTDOUTCONFIG._serialized_end=1372
|
|
110
|
-
_SANDBOXEXECSTARTREQUEST._serialized_start=82
|
|
111
|
-
_SANDBOXEXECSTARTREQUEST._serialized_end=483
|
|
112
|
-
_SANDBOXEXECSTARTRESPONSE._serialized_start=485
|
|
113
|
-
_SANDBOXEXECSTARTRESPONSE._serialized_end=511
|
|
114
|
-
_SANDBOXEXECSTDINWRITEREQUEST._serialized_start=513
|
|
115
|
-
_SANDBOXEXECSTDINWRITEREQUEST._serialized_end=620
|
|
116
|
-
_SANDBOXEXECSTDINWRITERESPONSE._serialized_start=622
|
|
117
|
-
_SANDBOXEXECSTDINWRITERESPONSE._serialized_end=653
|
|
118
|
-
_SANDBOXEXECSTDIOREADREQUEST._serialized_start=656
|
|
119
|
-
_SANDBOXEXECSTDIOREADREQUEST._serialized_end=814
|
|
120
|
-
_SANDBOXEXECSTDIOREADRESPONSE._serialized_start=816
|
|
121
|
-
_SANDBOXEXECSTDIOREADRESPONSE._serialized_end=860
|
|
122
|
-
_SANDBOXEXECWAITREQUEST._serialized_start=862
|
|
123
|
-
_SANDBOXEXECWAITREQUEST._serialized_end=920
|
|
124
|
-
_SANDBOXEXECWAITRESPONSE._serialized_start=922
|
|
125
|
-
_SANDBOXEXECWAITRESPONSE._serialized_end=996
|
|
126
|
-
_SANDBOXROUTER._serialized_start=1375
|
|
127
|
-
_SANDBOXROUTER._serialized_end=1877
|
|
128
|
-
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
-
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
-
import grpc
|
|
4
|
-
|
|
5
|
-
from modal_proto import sandbox_router_pb2 as modal__proto_dot_sandbox__router__pb2
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class SandboxRouterStub(object):
|
|
9
|
-
"""Missing associated documentation comment in .proto file."""
|
|
10
|
-
|
|
11
|
-
def __init__(self, channel):
|
|
12
|
-
"""Constructor.
|
|
13
|
-
|
|
14
|
-
Args:
|
|
15
|
-
channel: A grpc.Channel.
|
|
16
|
-
"""
|
|
17
|
-
self.SandboxExecStart = channel.unary_unary(
|
|
18
|
-
'/modal.sandbox_router.SandboxRouter/SandboxExecStart',
|
|
19
|
-
request_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStartRequest.SerializeToString,
|
|
20
|
-
response_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStartResponse.FromString,
|
|
21
|
-
)
|
|
22
|
-
self.SandboxExecStdinWrite = channel.unary_unary(
|
|
23
|
-
'/modal.sandbox_router.SandboxRouter/SandboxExecStdinWrite',
|
|
24
|
-
request_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStdinWriteRequest.SerializeToString,
|
|
25
|
-
response_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStdinWriteResponse.FromString,
|
|
26
|
-
)
|
|
27
|
-
self.SandboxExecStdioRead = channel.unary_stream(
|
|
28
|
-
'/modal.sandbox_router.SandboxRouter/SandboxExecStdioRead',
|
|
29
|
-
request_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStdioReadRequest.SerializeToString,
|
|
30
|
-
response_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStdioReadResponse.FromString,
|
|
31
|
-
)
|
|
32
|
-
self.SandboxExecWait = channel.unary_unary(
|
|
33
|
-
'/modal.sandbox_router.SandboxRouter/SandboxExecWait',
|
|
34
|
-
request_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecWaitRequest.SerializeToString,
|
|
35
|
-
response_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecWaitResponse.FromString,
|
|
36
|
-
)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class SandboxRouterServicer(object):
|
|
40
|
-
"""Missing associated documentation comment in .proto file."""
|
|
41
|
-
|
|
42
|
-
def SandboxExecStart(self, request, context):
|
|
43
|
-
"""Execute a command in the sandbox.
|
|
44
|
-
"""
|
|
45
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
46
|
-
context.set_details('Method not implemented!')
|
|
47
|
-
raise NotImplementedError('Method not implemented!')
|
|
48
|
-
|
|
49
|
-
def SandboxExecStdinWrite(self, request, context):
|
|
50
|
-
"""Write to the stdin stream of an exec'd command.
|
|
51
|
-
"""
|
|
52
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
53
|
-
context.set_details('Method not implemented!')
|
|
54
|
-
raise NotImplementedError('Method not implemented!')
|
|
55
|
-
|
|
56
|
-
def SandboxExecStdioRead(self, request, context):
|
|
57
|
-
"""Get a stream of output from the stdout or stderr stream of an exec'd command.
|
|
58
|
-
"""
|
|
59
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
60
|
-
context.set_details('Method not implemented!')
|
|
61
|
-
raise NotImplementedError('Method not implemented!')
|
|
62
|
-
|
|
63
|
-
def SandboxExecWait(self, request, context):
|
|
64
|
-
"""Wait for an exec'd command to exit and return the exit code.
|
|
65
|
-
"""
|
|
66
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
67
|
-
context.set_details('Method not implemented!')
|
|
68
|
-
raise NotImplementedError('Method not implemented!')
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
def add_SandboxRouterServicer_to_server(servicer, server):
|
|
72
|
-
rpc_method_handlers = {
|
|
73
|
-
'SandboxExecStart': grpc.unary_unary_rpc_method_handler(
|
|
74
|
-
servicer.SandboxExecStart,
|
|
75
|
-
request_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStartRequest.FromString,
|
|
76
|
-
response_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStartResponse.SerializeToString,
|
|
77
|
-
),
|
|
78
|
-
'SandboxExecStdinWrite': grpc.unary_unary_rpc_method_handler(
|
|
79
|
-
servicer.SandboxExecStdinWrite,
|
|
80
|
-
request_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStdinWriteRequest.FromString,
|
|
81
|
-
response_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStdinWriteResponse.SerializeToString,
|
|
82
|
-
),
|
|
83
|
-
'SandboxExecStdioRead': grpc.unary_stream_rpc_method_handler(
|
|
84
|
-
servicer.SandboxExecStdioRead,
|
|
85
|
-
request_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStdioReadRequest.FromString,
|
|
86
|
-
response_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStdioReadResponse.SerializeToString,
|
|
87
|
-
),
|
|
88
|
-
'SandboxExecWait': grpc.unary_unary_rpc_method_handler(
|
|
89
|
-
servicer.SandboxExecWait,
|
|
90
|
-
request_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecWaitRequest.FromString,
|
|
91
|
-
response_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecWaitResponse.SerializeToString,
|
|
92
|
-
),
|
|
93
|
-
}
|
|
94
|
-
generic_handler = grpc.method_handlers_generic_handler(
|
|
95
|
-
'modal.sandbox_router.SandboxRouter', rpc_method_handlers)
|
|
96
|
-
server.add_generic_rpc_handlers((generic_handler,))
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
# This class is part of an EXPERIMENTAL API.
|
|
100
|
-
class SandboxRouter(object):
|
|
101
|
-
"""Missing associated documentation comment in .proto file."""
|
|
102
|
-
|
|
103
|
-
@staticmethod
|
|
104
|
-
def SandboxExecStart(request,
|
|
105
|
-
target,
|
|
106
|
-
options=(),
|
|
107
|
-
channel_credentials=None,
|
|
108
|
-
call_credentials=None,
|
|
109
|
-
insecure=False,
|
|
110
|
-
compression=None,
|
|
111
|
-
wait_for_ready=None,
|
|
112
|
-
timeout=None,
|
|
113
|
-
metadata=None):
|
|
114
|
-
return grpc.experimental.unary_unary(request, target, '/modal.sandbox_router.SandboxRouter/SandboxExecStart',
|
|
115
|
-
modal__proto_dot_sandbox__router__pb2.SandboxExecStartRequest.SerializeToString,
|
|
116
|
-
modal__proto_dot_sandbox__router__pb2.SandboxExecStartResponse.FromString,
|
|
117
|
-
options, channel_credentials,
|
|
118
|
-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
119
|
-
|
|
120
|
-
@staticmethod
|
|
121
|
-
def SandboxExecStdinWrite(request,
|
|
122
|
-
target,
|
|
123
|
-
options=(),
|
|
124
|
-
channel_credentials=None,
|
|
125
|
-
call_credentials=None,
|
|
126
|
-
insecure=False,
|
|
127
|
-
compression=None,
|
|
128
|
-
wait_for_ready=None,
|
|
129
|
-
timeout=None,
|
|
130
|
-
metadata=None):
|
|
131
|
-
return grpc.experimental.unary_unary(request, target, '/modal.sandbox_router.SandboxRouter/SandboxExecStdinWrite',
|
|
132
|
-
modal__proto_dot_sandbox__router__pb2.SandboxExecStdinWriteRequest.SerializeToString,
|
|
133
|
-
modal__proto_dot_sandbox__router__pb2.SandboxExecStdinWriteResponse.FromString,
|
|
134
|
-
options, channel_credentials,
|
|
135
|
-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
136
|
-
|
|
137
|
-
@staticmethod
|
|
138
|
-
def SandboxExecStdioRead(request,
|
|
139
|
-
target,
|
|
140
|
-
options=(),
|
|
141
|
-
channel_credentials=None,
|
|
142
|
-
call_credentials=None,
|
|
143
|
-
insecure=False,
|
|
144
|
-
compression=None,
|
|
145
|
-
wait_for_ready=None,
|
|
146
|
-
timeout=None,
|
|
147
|
-
metadata=None):
|
|
148
|
-
return grpc.experimental.unary_stream(request, target, '/modal.sandbox_router.SandboxRouter/SandboxExecStdioRead',
|
|
149
|
-
modal__proto_dot_sandbox__router__pb2.SandboxExecStdioReadRequest.SerializeToString,
|
|
150
|
-
modal__proto_dot_sandbox__router__pb2.SandboxExecStdioReadResponse.FromString,
|
|
151
|
-
options, channel_credentials,
|
|
152
|
-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
153
|
-
|
|
154
|
-
@staticmethod
|
|
155
|
-
def SandboxExecWait(request,
|
|
156
|
-
target,
|
|
157
|
-
options=(),
|
|
158
|
-
channel_credentials=None,
|
|
159
|
-
call_credentials=None,
|
|
160
|
-
insecure=False,
|
|
161
|
-
compression=None,
|
|
162
|
-
wait_for_ready=None,
|
|
163
|
-
timeout=None,
|
|
164
|
-
metadata=None):
|
|
165
|
-
return grpc.experimental.unary_unary(request, target, '/modal.sandbox_router.SandboxRouter/SandboxExecWait',
|
|
166
|
-
modal__proto_dot_sandbox__router__pb2.SandboxExecWaitRequest.SerializeToString,
|
|
167
|
-
modal__proto_dot_sandbox__router__pb2.SandboxExecWaitResponse.FromString,
|
|
168
|
-
options, channel_credentials,
|
|
169
|
-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
-
isort:skip_file
|
|
4
|
-
"""
|
|
5
|
-
import abc
|
|
6
|
-
import collections.abc
|
|
7
|
-
import grpc
|
|
8
|
-
import modal_proto.sandbox_router_pb2
|
|
9
|
-
|
|
10
|
-
class SandboxRouterStub:
|
|
11
|
-
def __init__(self, channel: grpc.Channel) -> None: ...
|
|
12
|
-
SandboxExecStart: grpc.UnaryUnaryMultiCallable[
|
|
13
|
-
modal_proto.sandbox_router_pb2.SandboxExecStartRequest,
|
|
14
|
-
modal_proto.sandbox_router_pb2.SandboxExecStartResponse,
|
|
15
|
-
]
|
|
16
|
-
"""Execute a command in the sandbox."""
|
|
17
|
-
SandboxExecStdinWrite: grpc.UnaryUnaryMultiCallable[
|
|
18
|
-
modal_proto.sandbox_router_pb2.SandboxExecStdinWriteRequest,
|
|
19
|
-
modal_proto.sandbox_router_pb2.SandboxExecStdinWriteResponse,
|
|
20
|
-
]
|
|
21
|
-
"""Write to the stdin stream of an exec'd command."""
|
|
22
|
-
SandboxExecStdioRead: grpc.UnaryStreamMultiCallable[
|
|
23
|
-
modal_proto.sandbox_router_pb2.SandboxExecStdioReadRequest,
|
|
24
|
-
modal_proto.sandbox_router_pb2.SandboxExecStdioReadResponse,
|
|
25
|
-
]
|
|
26
|
-
"""Get a stream of output from the stdout or stderr stream of an exec'd command."""
|
|
27
|
-
SandboxExecWait: grpc.UnaryUnaryMultiCallable[
|
|
28
|
-
modal_proto.sandbox_router_pb2.SandboxExecWaitRequest,
|
|
29
|
-
modal_proto.sandbox_router_pb2.SandboxExecWaitResponse,
|
|
30
|
-
]
|
|
31
|
-
"""Wait for an exec'd command to exit and return the exit code."""
|
|
32
|
-
|
|
33
|
-
class SandboxRouterServicer(metaclass=abc.ABCMeta):
|
|
34
|
-
@abc.abstractmethod
|
|
35
|
-
def SandboxExecStart(
|
|
36
|
-
self,
|
|
37
|
-
request: modal_proto.sandbox_router_pb2.SandboxExecStartRequest,
|
|
38
|
-
context: grpc.ServicerContext,
|
|
39
|
-
) -> modal_proto.sandbox_router_pb2.SandboxExecStartResponse:
|
|
40
|
-
"""Execute a command in the sandbox."""
|
|
41
|
-
@abc.abstractmethod
|
|
42
|
-
def SandboxExecStdinWrite(
|
|
43
|
-
self,
|
|
44
|
-
request: modal_proto.sandbox_router_pb2.SandboxExecStdinWriteRequest,
|
|
45
|
-
context: grpc.ServicerContext,
|
|
46
|
-
) -> modal_proto.sandbox_router_pb2.SandboxExecStdinWriteResponse:
|
|
47
|
-
"""Write to the stdin stream of an exec'd command."""
|
|
48
|
-
@abc.abstractmethod
|
|
49
|
-
def SandboxExecStdioRead(
|
|
50
|
-
self,
|
|
51
|
-
request: modal_proto.sandbox_router_pb2.SandboxExecStdioReadRequest,
|
|
52
|
-
context: grpc.ServicerContext,
|
|
53
|
-
) -> collections.abc.Iterator[modal_proto.sandbox_router_pb2.SandboxExecStdioReadResponse]:
|
|
54
|
-
"""Get a stream of output from the stdout or stderr stream of an exec'd command."""
|
|
55
|
-
@abc.abstractmethod
|
|
56
|
-
def SandboxExecWait(
|
|
57
|
-
self,
|
|
58
|
-
request: modal_proto.sandbox_router_pb2.SandboxExecWaitRequest,
|
|
59
|
-
context: grpc.ServicerContext,
|
|
60
|
-
) -> modal_proto.sandbox_router_pb2.SandboxExecWaitResponse:
|
|
61
|
-
"""Wait for an exec'd command to exit and return the exit code."""
|
|
62
|
-
|
|
63
|
-
def add_SandboxRouterServicer_to_server(servicer: SandboxRouterServicer, server: grpc.Server) -> None: ...
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|