rapida-python 0.0.3__py3-none-any.whl → 0.0.5__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.
- rapida/artifacts/protos/endpoint_service/__init__.py +0 -3
- rapida/artifacts/protos/endpoint_service/invoker_api_pb2.py +76 -0
- rapida/artifacts/protos/endpoint_service/invoker_api_pb2.pyi +169 -0
- rapida/artifacts/protos/endpoint_service/invoker_api_pb2_grpc.py +171 -0
- rapida/exceptions/exceptions.py +13 -4
- rapida/rapida_client.py +0 -3
- rapida/rapida_client_options.py +2 -2
- rapida/version.py +1 -1
- {rapida_python-0.0.3.dist-info → rapida_python-0.0.5.dist-info}/METADATA +1 -1
- {rapida_python-0.0.3.dist-info → rapida_python-0.0.5.dist-info}/RECORD +12 -9
- {rapida_python-0.0.3.dist-info → rapida_python-0.0.5.dist-info}/WHEEL +0 -0
- {rapida_python-0.0.3.dist-info → rapida_python-0.0.5.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# source: rapida/artifacts/protos/endpoint_service/invoker-api.proto
|
|
3
|
+
# Protobuf Python Version: 4.25.0
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf import descriptor as _descriptor
|
|
6
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
7
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
8
|
+
from google.protobuf.internal import builder as _builder
|
|
9
|
+
|
|
10
|
+
# @@protoc_insertion_point(imports)
|
|
11
|
+
|
|
12
|
+
_sym_db = _symbol_database.Default()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
|
|
19
|
+
b'\n:rapida/artifacts/protos/endpoint_service/invoker-api.proto\x12\x0c\x65ndpoint_api\x1a\x1cgoogle/protobuf/struct.proto"Q\n\x0cInvokerError\x12\x15\n\terrorCode\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x14\n\x0c\x65rrorMessage\x18\x02 \x01(\t\x12\x14\n\x0chumanMessage\x18\x03 \x01(\t"=\n\x12\x45ndpointDefinition\x12\x16\n\nendpointId\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x0f\n\x07version\x18\x02 \x01(\t"\xfe\x02\n\rInvokeRequest\x12\x32\n\x08\x65ndpoint\x18\x01 \x01(\x0b\x32 .endpoint_api.EndpointDefinition\x12\x33\n\x04\x61rgs\x18\x02 \x03(\x0b\x32%.endpoint_api.InvokeRequest.ArgsEntry\x12;\n\x08metadata\x18\x03 \x03(\x0b\x32).endpoint_api.InvokeRequest.MetadataEntry\x12\x39\n\x07options\x18\x04 \x03(\x0b\x32(.endpoint_api.InvokeRequest.OptionsEntry\x1a+\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a.\n\x0cOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"H\n\x0e\x43\x61llerResponse\x12\x11\n\trequestId\x18\x01 \x01(\x04\x12\x10\n\x08response\x18\x02 \x01(\t\x12\x11\n\ttimeTaken\x18\x03 \x01(\x04"\x95\x01\n\x0eInvokeResponse\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12*\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x1c.endpoint_api.CallerResponse\x12.\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x1a.endpoint_api.InvokerErrorH\x00\x88\x01\x01\x42\x08\n\x06_error"Q\n\rUpdateRequest\x12\x15\n\trequestId\x18\x01 \x01(\x04\x42\x02\x30\x01\x12)\n\x08metadata\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct"i\n\x0eUpdateResponse\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12.\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x1a.endpoint_api.InvokerErrorH\x00\x88\x01\x01\x42\x08\n\x06_error"%\n\x0cProbeRequest\x12\x15\n\trequestId\x18\x01 \x01(\x04\x42\x02\x30\x01"\x8f\x01\n\rProbeResponse\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12%\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12.\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x1a.endpoint_api.InvokerErrorH\x00\x88\x01\x01\x42\x08\n\x06_error2\xd8\x01\n\nDeployment\x12\x43\n\x06Invoke\x12\x1b.endpoint_api.InvokeRequest\x1a\x1c.endpoint_api.InvokeResponse\x12\x43\n\x06Update\x12\x1b.endpoint_api.UpdateRequest\x1a\x1c.endpoint_api.UpdateResponse\x12@\n\x05Probe\x12\x1a.endpoint_api.ProbeRequest\x1a\x1b.endpoint_api.ProbeResponseB7Z5github.com/lexatic/web-backend/protos/lexatic-backendb\x06proto3'
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
_globals = globals()
|
|
23
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
24
|
+
_builder.BuildTopDescriptorsAndMessages(
|
|
25
|
+
DESCRIPTOR, "rapida.artifacts.protos.endpoint_service.invoker_api_pb2", _globals
|
|
26
|
+
)
|
|
27
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
28
|
+
_globals["DESCRIPTOR"]._options = None
|
|
29
|
+
_globals[
|
|
30
|
+
"DESCRIPTOR"
|
|
31
|
+
]._serialized_options = b"Z5github.com/lexatic/web-backend/protos/lexatic-backend"
|
|
32
|
+
_globals["_INVOKERERROR"].fields_by_name["errorCode"]._options = None
|
|
33
|
+
_globals["_INVOKERERROR"].fields_by_name["errorCode"]._serialized_options = b"0\001"
|
|
34
|
+
_globals["_ENDPOINTDEFINITION"].fields_by_name["endpointId"]._options = None
|
|
35
|
+
_globals["_ENDPOINTDEFINITION"].fields_by_name[
|
|
36
|
+
"endpointId"
|
|
37
|
+
]._serialized_options = b"0\001"
|
|
38
|
+
_globals["_INVOKEREQUEST_ARGSENTRY"]._options = None
|
|
39
|
+
_globals["_INVOKEREQUEST_ARGSENTRY"]._serialized_options = b"8\001"
|
|
40
|
+
_globals["_INVOKEREQUEST_METADATAENTRY"]._options = None
|
|
41
|
+
_globals["_INVOKEREQUEST_METADATAENTRY"]._serialized_options = b"8\001"
|
|
42
|
+
_globals["_INVOKEREQUEST_OPTIONSENTRY"]._options = None
|
|
43
|
+
_globals["_INVOKEREQUEST_OPTIONSENTRY"]._serialized_options = b"8\001"
|
|
44
|
+
_globals["_UPDATEREQUEST"].fields_by_name["requestId"]._options = None
|
|
45
|
+
_globals["_UPDATEREQUEST"].fields_by_name[
|
|
46
|
+
"requestId"
|
|
47
|
+
]._serialized_options = b"0\001"
|
|
48
|
+
_globals["_PROBEREQUEST"].fields_by_name["requestId"]._options = None
|
|
49
|
+
_globals["_PROBEREQUEST"].fields_by_name["requestId"]._serialized_options = b"0\001"
|
|
50
|
+
_globals["_INVOKERERROR"]._serialized_start = 106
|
|
51
|
+
_globals["_INVOKERERROR"]._serialized_end = 187
|
|
52
|
+
_globals["_ENDPOINTDEFINITION"]._serialized_start = 189
|
|
53
|
+
_globals["_ENDPOINTDEFINITION"]._serialized_end = 250
|
|
54
|
+
_globals["_INVOKEREQUEST"]._serialized_start = 253
|
|
55
|
+
_globals["_INVOKEREQUEST"]._serialized_end = 635
|
|
56
|
+
_globals["_INVOKEREQUEST_ARGSENTRY"]._serialized_start = 495
|
|
57
|
+
_globals["_INVOKEREQUEST_ARGSENTRY"]._serialized_end = 538
|
|
58
|
+
_globals["_INVOKEREQUEST_METADATAENTRY"]._serialized_start = 540
|
|
59
|
+
_globals["_INVOKEREQUEST_METADATAENTRY"]._serialized_end = 587
|
|
60
|
+
_globals["_INVOKEREQUEST_OPTIONSENTRY"]._serialized_start = 589
|
|
61
|
+
_globals["_INVOKEREQUEST_OPTIONSENTRY"]._serialized_end = 635
|
|
62
|
+
_globals["_CALLERRESPONSE"]._serialized_start = 637
|
|
63
|
+
_globals["_CALLERRESPONSE"]._serialized_end = 709
|
|
64
|
+
_globals["_INVOKERESPONSE"]._serialized_start = 712
|
|
65
|
+
_globals["_INVOKERESPONSE"]._serialized_end = 861
|
|
66
|
+
_globals["_UPDATEREQUEST"]._serialized_start = 863
|
|
67
|
+
_globals["_UPDATEREQUEST"]._serialized_end = 944
|
|
68
|
+
_globals["_UPDATERESPONSE"]._serialized_start = 946
|
|
69
|
+
_globals["_UPDATERESPONSE"]._serialized_end = 1051
|
|
70
|
+
_globals["_PROBEREQUEST"]._serialized_start = 1053
|
|
71
|
+
_globals["_PROBEREQUEST"]._serialized_end = 1090
|
|
72
|
+
_globals["_PROBERESPONSE"]._serialized_start = 1093
|
|
73
|
+
_globals["_PROBERESPONSE"]._serialized_end = 1236
|
|
74
|
+
_globals["_DEPLOYMENT"]._serialized_start = 1239
|
|
75
|
+
_globals["_DEPLOYMENT"]._serialized_end = 1455
|
|
76
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
from google.protobuf import struct_pb2 as _struct_pb2
|
|
2
|
+
from google.protobuf.internal import containers as _containers
|
|
3
|
+
from google.protobuf import descriptor as _descriptor
|
|
4
|
+
from google.protobuf import message as _message
|
|
5
|
+
from typing import (
|
|
6
|
+
ClassVar as _ClassVar,
|
|
7
|
+
Mapping as _Mapping,
|
|
8
|
+
Optional as _Optional,
|
|
9
|
+
Union as _Union,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
13
|
+
|
|
14
|
+
class InvokerError(_message.Message):
|
|
15
|
+
__slots__ = ("errorCode", "errorMessage", "humanMessage")
|
|
16
|
+
ERRORCODE_FIELD_NUMBER: _ClassVar[int]
|
|
17
|
+
ERRORMESSAGE_FIELD_NUMBER: _ClassVar[int]
|
|
18
|
+
HUMANMESSAGE_FIELD_NUMBER: _ClassVar[int]
|
|
19
|
+
errorCode: int
|
|
20
|
+
errorMessage: str
|
|
21
|
+
humanMessage: str
|
|
22
|
+
def __init__(
|
|
23
|
+
self,
|
|
24
|
+
errorCode: _Optional[int] = ...,
|
|
25
|
+
errorMessage: _Optional[str] = ...,
|
|
26
|
+
humanMessage: _Optional[str] = ...,
|
|
27
|
+
) -> None: ...
|
|
28
|
+
|
|
29
|
+
class EndpointDefinition(_message.Message):
|
|
30
|
+
__slots__ = ("endpointId", "version")
|
|
31
|
+
ENDPOINTID_FIELD_NUMBER: _ClassVar[int]
|
|
32
|
+
VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
33
|
+
endpointId: int
|
|
34
|
+
version: str
|
|
35
|
+
def __init__(
|
|
36
|
+
self, endpointId: _Optional[int] = ..., version: _Optional[str] = ...
|
|
37
|
+
) -> None: ...
|
|
38
|
+
|
|
39
|
+
class InvokeRequest(_message.Message):
|
|
40
|
+
__slots__ = ("endpoint", "args", "metadata", "options")
|
|
41
|
+
|
|
42
|
+
class ArgsEntry(_message.Message):
|
|
43
|
+
__slots__ = ("key", "value")
|
|
44
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
45
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
46
|
+
key: str
|
|
47
|
+
value: str
|
|
48
|
+
def __init__(
|
|
49
|
+
self, key: _Optional[str] = ..., value: _Optional[str] = ...
|
|
50
|
+
) -> None: ...
|
|
51
|
+
|
|
52
|
+
class MetadataEntry(_message.Message):
|
|
53
|
+
__slots__ = ("key", "value")
|
|
54
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
55
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
56
|
+
key: str
|
|
57
|
+
value: str
|
|
58
|
+
def __init__(
|
|
59
|
+
self, key: _Optional[str] = ..., value: _Optional[str] = ...
|
|
60
|
+
) -> None: ...
|
|
61
|
+
|
|
62
|
+
class OptionsEntry(_message.Message):
|
|
63
|
+
__slots__ = ("key", "value")
|
|
64
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
65
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
66
|
+
key: str
|
|
67
|
+
value: str
|
|
68
|
+
def __init__(
|
|
69
|
+
self, key: _Optional[str] = ..., value: _Optional[str] = ...
|
|
70
|
+
) -> None: ...
|
|
71
|
+
ENDPOINT_FIELD_NUMBER: _ClassVar[int]
|
|
72
|
+
ARGS_FIELD_NUMBER: _ClassVar[int]
|
|
73
|
+
METADATA_FIELD_NUMBER: _ClassVar[int]
|
|
74
|
+
OPTIONS_FIELD_NUMBER: _ClassVar[int]
|
|
75
|
+
endpoint: EndpointDefinition
|
|
76
|
+
args: _containers.ScalarMap[str, str]
|
|
77
|
+
metadata: _containers.ScalarMap[str, str]
|
|
78
|
+
options: _containers.ScalarMap[str, str]
|
|
79
|
+
def __init__(
|
|
80
|
+
self,
|
|
81
|
+
endpoint: _Optional[_Union[EndpointDefinition, _Mapping]] = ...,
|
|
82
|
+
args: _Optional[_Mapping[str, str]] = ...,
|
|
83
|
+
metadata: _Optional[_Mapping[str, str]] = ...,
|
|
84
|
+
options: _Optional[_Mapping[str, str]] = ...,
|
|
85
|
+
) -> None: ...
|
|
86
|
+
|
|
87
|
+
class CallerResponse(_message.Message):
|
|
88
|
+
__slots__ = ("requestId", "response", "timeTaken")
|
|
89
|
+
REQUESTID_FIELD_NUMBER: _ClassVar[int]
|
|
90
|
+
RESPONSE_FIELD_NUMBER: _ClassVar[int]
|
|
91
|
+
TIMETAKEN_FIELD_NUMBER: _ClassVar[int]
|
|
92
|
+
requestId: int
|
|
93
|
+
response: str
|
|
94
|
+
timeTaken: int
|
|
95
|
+
def __init__(
|
|
96
|
+
self,
|
|
97
|
+
requestId: _Optional[int] = ...,
|
|
98
|
+
response: _Optional[str] = ...,
|
|
99
|
+
timeTaken: _Optional[int] = ...,
|
|
100
|
+
) -> None: ...
|
|
101
|
+
|
|
102
|
+
class InvokeResponse(_message.Message):
|
|
103
|
+
__slots__ = ("code", "success", "data", "error")
|
|
104
|
+
CODE_FIELD_NUMBER: _ClassVar[int]
|
|
105
|
+
SUCCESS_FIELD_NUMBER: _ClassVar[int]
|
|
106
|
+
DATA_FIELD_NUMBER: _ClassVar[int]
|
|
107
|
+
ERROR_FIELD_NUMBER: _ClassVar[int]
|
|
108
|
+
code: int
|
|
109
|
+
success: bool
|
|
110
|
+
data: CallerResponse
|
|
111
|
+
error: InvokerError
|
|
112
|
+
def __init__(
|
|
113
|
+
self,
|
|
114
|
+
code: _Optional[int] = ...,
|
|
115
|
+
success: bool = ...,
|
|
116
|
+
data: _Optional[_Union[CallerResponse, _Mapping]] = ...,
|
|
117
|
+
error: _Optional[_Union[InvokerError, _Mapping]] = ...,
|
|
118
|
+
) -> None: ...
|
|
119
|
+
|
|
120
|
+
class UpdateRequest(_message.Message):
|
|
121
|
+
__slots__ = ("requestId", "metadata")
|
|
122
|
+
REQUESTID_FIELD_NUMBER: _ClassVar[int]
|
|
123
|
+
METADATA_FIELD_NUMBER: _ClassVar[int]
|
|
124
|
+
requestId: int
|
|
125
|
+
metadata: _struct_pb2.Struct
|
|
126
|
+
def __init__(
|
|
127
|
+
self,
|
|
128
|
+
requestId: _Optional[int] = ...,
|
|
129
|
+
metadata: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...,
|
|
130
|
+
) -> None: ...
|
|
131
|
+
|
|
132
|
+
class UpdateResponse(_message.Message):
|
|
133
|
+
__slots__ = ("code", "success", "error")
|
|
134
|
+
CODE_FIELD_NUMBER: _ClassVar[int]
|
|
135
|
+
SUCCESS_FIELD_NUMBER: _ClassVar[int]
|
|
136
|
+
ERROR_FIELD_NUMBER: _ClassVar[int]
|
|
137
|
+
code: int
|
|
138
|
+
success: bool
|
|
139
|
+
error: InvokerError
|
|
140
|
+
def __init__(
|
|
141
|
+
self,
|
|
142
|
+
code: _Optional[int] = ...,
|
|
143
|
+
success: bool = ...,
|
|
144
|
+
error: _Optional[_Union[InvokerError, _Mapping]] = ...,
|
|
145
|
+
) -> None: ...
|
|
146
|
+
|
|
147
|
+
class ProbeRequest(_message.Message):
|
|
148
|
+
__slots__ = ("requestId",)
|
|
149
|
+
REQUESTID_FIELD_NUMBER: _ClassVar[int]
|
|
150
|
+
requestId: int
|
|
151
|
+
def __init__(self, requestId: _Optional[int] = ...) -> None: ...
|
|
152
|
+
|
|
153
|
+
class ProbeResponse(_message.Message):
|
|
154
|
+
__slots__ = ("code", "success", "data", "error")
|
|
155
|
+
CODE_FIELD_NUMBER: _ClassVar[int]
|
|
156
|
+
SUCCESS_FIELD_NUMBER: _ClassVar[int]
|
|
157
|
+
DATA_FIELD_NUMBER: _ClassVar[int]
|
|
158
|
+
ERROR_FIELD_NUMBER: _ClassVar[int]
|
|
159
|
+
code: int
|
|
160
|
+
success: bool
|
|
161
|
+
data: _struct_pb2.Struct
|
|
162
|
+
error: InvokerError
|
|
163
|
+
def __init__(
|
|
164
|
+
self,
|
|
165
|
+
code: _Optional[int] = ...,
|
|
166
|
+
success: bool = ...,
|
|
167
|
+
data: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...,
|
|
168
|
+
error: _Optional[_Union[InvokerError, _Mapping]] = ...,
|
|
169
|
+
) -> None: ...
|
|
@@ -0,0 +1,171 @@
|
|
|
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 rapida.artifacts.protos.endpoint_service import (
|
|
6
|
+
invoker_api_pb2 as rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DeploymentStub:
|
|
11
|
+
"""Missing associated documentation comment in .proto file."""
|
|
12
|
+
|
|
13
|
+
def __init__(self, channel):
|
|
14
|
+
"""Constructor.
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
channel: A grpc.Channel.
|
|
18
|
+
"""
|
|
19
|
+
self.Invoke = channel.unary_unary(
|
|
20
|
+
"/endpoint_api.Deployment/Invoke",
|
|
21
|
+
request_serializer=rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.InvokeRequest.SerializeToString,
|
|
22
|
+
response_deserializer=rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.InvokeResponse.FromString,
|
|
23
|
+
)
|
|
24
|
+
self.Update = channel.unary_unary(
|
|
25
|
+
"/endpoint_api.Deployment/Update",
|
|
26
|
+
request_serializer=rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.UpdateRequest.SerializeToString,
|
|
27
|
+
response_deserializer=rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.UpdateResponse.FromString,
|
|
28
|
+
)
|
|
29
|
+
self.Probe = channel.unary_unary(
|
|
30
|
+
"/endpoint_api.Deployment/Probe",
|
|
31
|
+
request_serializer=rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.ProbeRequest.SerializeToString,
|
|
32
|
+
response_deserializer=rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.ProbeResponse.FromString,
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class DeploymentServicer:
|
|
37
|
+
"""Missing associated documentation comment in .proto file."""
|
|
38
|
+
|
|
39
|
+
def Invoke(self, request, context):
|
|
40
|
+
"""Missing associated documentation comment in .proto file."""
|
|
41
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
42
|
+
context.set_details("Method not implemented!")
|
|
43
|
+
raise NotImplementedError("Method not implemented!")
|
|
44
|
+
|
|
45
|
+
def Update(self, request, context):
|
|
46
|
+
"""Missing associated documentation comment in .proto file."""
|
|
47
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
48
|
+
context.set_details("Method not implemented!")
|
|
49
|
+
raise NotImplementedError("Method not implemented!")
|
|
50
|
+
|
|
51
|
+
def Probe(self, request, context):
|
|
52
|
+
"""Missing associated documentation comment in .proto file."""
|
|
53
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
54
|
+
context.set_details("Method not implemented!")
|
|
55
|
+
raise NotImplementedError("Method not implemented!")
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def add_DeploymentServicer_to_server(servicer, server):
|
|
59
|
+
rpc_method_handlers = {
|
|
60
|
+
"Invoke": grpc.unary_unary_rpc_method_handler(
|
|
61
|
+
servicer.Invoke,
|
|
62
|
+
request_deserializer=rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.InvokeRequest.FromString,
|
|
63
|
+
response_serializer=rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.InvokeResponse.SerializeToString,
|
|
64
|
+
),
|
|
65
|
+
"Update": grpc.unary_unary_rpc_method_handler(
|
|
66
|
+
servicer.Update,
|
|
67
|
+
request_deserializer=rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.UpdateRequest.FromString,
|
|
68
|
+
response_serializer=rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.UpdateResponse.SerializeToString,
|
|
69
|
+
),
|
|
70
|
+
"Probe": grpc.unary_unary_rpc_method_handler(
|
|
71
|
+
servicer.Probe,
|
|
72
|
+
request_deserializer=rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.ProbeRequest.FromString,
|
|
73
|
+
response_serializer=rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.ProbeResponse.SerializeToString,
|
|
74
|
+
),
|
|
75
|
+
}
|
|
76
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
77
|
+
"endpoint_api.Deployment", rpc_method_handlers
|
|
78
|
+
)
|
|
79
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
# This class is part of an EXPERIMENTAL API.
|
|
83
|
+
class Deployment:
|
|
84
|
+
"""Missing associated documentation comment in .proto file."""
|
|
85
|
+
|
|
86
|
+
@staticmethod
|
|
87
|
+
def Invoke(
|
|
88
|
+
request,
|
|
89
|
+
target,
|
|
90
|
+
options=(),
|
|
91
|
+
channel_credentials=None,
|
|
92
|
+
call_credentials=None,
|
|
93
|
+
insecure=False,
|
|
94
|
+
compression=None,
|
|
95
|
+
wait_for_ready=None,
|
|
96
|
+
timeout=None,
|
|
97
|
+
metadata=None,
|
|
98
|
+
):
|
|
99
|
+
return grpc.experimental.unary_unary(
|
|
100
|
+
request,
|
|
101
|
+
target,
|
|
102
|
+
"/endpoint_api.Deployment/Invoke",
|
|
103
|
+
rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.InvokeRequest.SerializeToString,
|
|
104
|
+
rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.InvokeResponse.FromString,
|
|
105
|
+
options,
|
|
106
|
+
channel_credentials,
|
|
107
|
+
insecure,
|
|
108
|
+
call_credentials,
|
|
109
|
+
compression,
|
|
110
|
+
wait_for_ready,
|
|
111
|
+
timeout,
|
|
112
|
+
metadata,
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
@staticmethod
|
|
116
|
+
def Update(
|
|
117
|
+
request,
|
|
118
|
+
target,
|
|
119
|
+
options=(),
|
|
120
|
+
channel_credentials=None,
|
|
121
|
+
call_credentials=None,
|
|
122
|
+
insecure=False,
|
|
123
|
+
compression=None,
|
|
124
|
+
wait_for_ready=None,
|
|
125
|
+
timeout=None,
|
|
126
|
+
metadata=None,
|
|
127
|
+
):
|
|
128
|
+
return grpc.experimental.unary_unary(
|
|
129
|
+
request,
|
|
130
|
+
target,
|
|
131
|
+
"/endpoint_api.Deployment/Update",
|
|
132
|
+
rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.UpdateRequest.SerializeToString,
|
|
133
|
+
rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.UpdateResponse.FromString,
|
|
134
|
+
options,
|
|
135
|
+
channel_credentials,
|
|
136
|
+
insecure,
|
|
137
|
+
call_credentials,
|
|
138
|
+
compression,
|
|
139
|
+
wait_for_ready,
|
|
140
|
+
timeout,
|
|
141
|
+
metadata,
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
@staticmethod
|
|
145
|
+
def Probe(
|
|
146
|
+
request,
|
|
147
|
+
target,
|
|
148
|
+
options=(),
|
|
149
|
+
channel_credentials=None,
|
|
150
|
+
call_credentials=None,
|
|
151
|
+
insecure=False,
|
|
152
|
+
compression=None,
|
|
153
|
+
wait_for_ready=None,
|
|
154
|
+
timeout=None,
|
|
155
|
+
metadata=None,
|
|
156
|
+
):
|
|
157
|
+
return grpc.experimental.unary_unary(
|
|
158
|
+
request,
|
|
159
|
+
target,
|
|
160
|
+
"/endpoint_api.Deployment/Probe",
|
|
161
|
+
rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.ProbeRequest.SerializeToString,
|
|
162
|
+
rapida_dot_artifacts_dot_protos_dot_endpoint__service_dot_invoker__api__pb2.ProbeResponse.FromString,
|
|
163
|
+
options,
|
|
164
|
+
channel_credentials,
|
|
165
|
+
insecure,
|
|
166
|
+
call_credentials,
|
|
167
|
+
compression,
|
|
168
|
+
wait_for_ready,
|
|
169
|
+
timeout,
|
|
170
|
+
metadata,
|
|
171
|
+
)
|
rapida/exceptions/exceptions.py
CHANGED
|
@@ -44,19 +44,22 @@ class RapidaConfigurationException(RapidaException):
|
|
|
44
44
|
An error caused by client or server configuration
|
|
45
45
|
"""
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
def __init__(self, message: str, source: str):
|
|
48
|
+
super().__init__(400, message, source)
|
|
48
49
|
|
|
49
50
|
|
|
50
51
|
class RapidaInternalServerException(RapidaException):
|
|
51
52
|
"""An error caused by uncontrolled server response"""
|
|
52
53
|
|
|
53
|
-
|
|
54
|
+
def __init__(self, code: int, message: str, source: str):
|
|
55
|
+
super().__init__(code, message, source)
|
|
54
56
|
|
|
55
57
|
|
|
56
58
|
class RapidaInvalidAPIException(RapidaException):
|
|
57
59
|
"""Raised if the provider API key is invalid."""
|
|
58
60
|
|
|
59
|
-
|
|
61
|
+
def __init__(self, code: int, message: str, source: str):
|
|
62
|
+
super().__init__(code, message, source)
|
|
60
63
|
|
|
61
64
|
|
|
62
65
|
def handle_request_exception(error: InvokerError):
|
|
@@ -84,8 +87,14 @@ def handle_request_exception(error: InvokerError):
|
|
|
84
87
|
|
|
85
88
|
|
|
86
89
|
class RapidaWarning(Warning):
|
|
90
|
+
"""
|
|
91
|
+
Warning message
|
|
92
|
+
"""
|
|
93
|
+
|
|
94
|
+
message: str
|
|
95
|
+
|
|
87
96
|
def __init__(self, message: str):
|
|
88
|
-
super().__init__(
|
|
97
|
+
super().__init__(message)
|
|
89
98
|
|
|
90
99
|
def __str__(self) -> str:
|
|
91
100
|
"""
|
rapida/rapida_client.py
CHANGED
|
@@ -30,9 +30,6 @@ class RapidaClient:
|
|
|
30
30
|
if options.rapida_api_key is None or len(options.rapida_api_key) == 0:
|
|
31
31
|
raise RapidaConfigurationException("The provided API key is invalid.")
|
|
32
32
|
|
|
33
|
-
if options.rapida_endpoint_url is None or len(options.rapida_endpoint_url) == 0:
|
|
34
|
-
raise RapidaConfigurationException("The provided endpoint URL is invalid.")
|
|
35
|
-
|
|
36
33
|
self.options = options
|
|
37
34
|
self.rapida_bridge = RapidaBridge(
|
|
38
35
|
service_url=options.rapida_endpoint_url,
|
rapida/rapida_client_options.py
CHANGED
|
@@ -85,8 +85,8 @@ class RapidaClientOptions:
|
|
|
85
85
|
environment:
|
|
86
86
|
"""
|
|
87
87
|
self.rapida_api_key = api_key or os.environ.get("RAPIDA_API_KEY")
|
|
88
|
-
self.rapida_endpoint_url =
|
|
89
|
-
"RAPIDA_ENDPOINT_URL" or self.ENDPOINT_URL
|
|
88
|
+
self.rapida_endpoint_url = (
|
|
89
|
+
endpoint_url or os.environ.get("RAPIDA_ENDPOINT_URL") or self.ENDPOINT_URL
|
|
90
90
|
)
|
|
91
91
|
self.rapida_environment = environment or os.environ.get("RAPIDA_ENVIRONMENT")
|
|
92
92
|
self.rapida_region = region or os.environ.get("RAPIDA_REGION")
|
rapida/version.py
CHANGED
|
@@ -3,24 +3,27 @@ rapida/client.py,sha256=MVMKMg0toPNA0AUlJNFad61nSbfu8zTeQsSkq5Z2-Q4,803
|
|
|
3
3
|
rapida/exceptions.py,sha256=zQgIbRlYEzMI8-5mx7KI9NSeP6FF75UQ4--o0xZjP_o,1778
|
|
4
4
|
rapida/http_client.py,sha256=_L0Ioep0bBavNGQ6m2kuXh4V98eqqGNvOSMJt0CN50o,1045
|
|
5
5
|
rapida/options.py,sha256=85AOqWLEFd4-Wxr29OI5b59RYb1-Uyb-YcMzx8IbQC8,463
|
|
6
|
-
rapida/rapida_client.py,sha256=
|
|
7
|
-
rapida/rapida_client_options.py,sha256=
|
|
6
|
+
rapida/rapida_client.py,sha256=erlDXJQUT6gVLLl3VKspisMkdxpDIqyTIKXP1IezHYg,5148
|
|
7
|
+
rapida/rapida_client_options.py,sha256=P_54uLDqVJnnMITDdNMEaNRjMghmVKgffT1bOQTpcz0,2382
|
|
8
8
|
rapida/util.py,sha256=qB0PX71MTglzp5J3AGIY7F4-ReWBuxSQdRsh-5Kuezw,1418
|
|
9
|
-
rapida/version.py,sha256=
|
|
9
|
+
rapida/version.py,sha256=HBduVYNOHnd6dXMNT8zPaxMdMM6zwlY01CBBUveLmVI,159
|
|
10
10
|
rapida/api_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
rapida/api_resources/deployments.py,sha256=HbsY4RUDXAgJKlQDtpUwmNk1Z0RXB8qMW0QO6Z_F0jM,16590
|
|
12
12
|
rapida/artifacts/__init__.py,sha256=uunvHyOaVic6mTNNF4PCIyo1VGRDH5PwAoLhf3I-lCA,35
|
|
13
13
|
rapida/artifacts/protos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
-
rapida/artifacts/protos/endpoint_service/__init__.py,sha256=
|
|
14
|
+
rapida/artifacts/protos/endpoint_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
+
rapida/artifacts/protos/endpoint_service/invoker_api_pb2.py,sha256=EWJBjnYxA3sDXv_Ir2Nh3hLya_EfftE4irMblRxPtMo,6272
|
|
16
|
+
rapida/artifacts/protos/endpoint_service/invoker_api_pb2.pyi,sha256=s4DrVtnvZuNiSuH-2AMOkE_hlRXxmNLKNpU6t353Xto,5487
|
|
17
|
+
rapida/artifacts/protos/endpoint_service/invoker_api_pb2_grpc.py,sha256=DZOeeXXYVU-QYVXR87JaZ3audvLtDAT0t-xQLYEoCO0,6709
|
|
15
18
|
rapida/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
19
|
rapida/client/grpc_bridge.py,sha256=NX7uVViaOVeAzE0K0lduJJ5Zj3lTskCVo887KFjOeFs,4905
|
|
17
20
|
rapida/client/rapida_bridge.py,sha256=SxoWHq5oriWZBQidzOy7rmJT8OXCNLL8C5yqxAlNk3o,3767
|
|
18
21
|
rapida/client/response_wrapper.py,sha256=6Gy9bE7Yi5a3wFbwyVhbDZuBJHhD5wfYi4E9F5qzX5c,2417
|
|
19
22
|
rapida/exceptions/__init__.py,sha256=2wuqt5z5AWGqMJtR0ba_GQ0irANPOTR7AYakT-vbZwY,400
|
|
20
|
-
rapida/exceptions/exceptions.py,sha256=
|
|
23
|
+
rapida/exceptions/exceptions.py,sha256=KAuQpDaVhOUfGcX2FpZdmgob691GmPMAT3KK2TaN8dA,2847
|
|
21
24
|
rapida/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
25
|
rapida/tests/test_deployments.py,sha256=zgr0PTPoLqzKkSudR3lmzj1lUAkNiAPsWx42aKG-SAQ,36
|
|
23
|
-
rapida_python-0.0.
|
|
24
|
-
rapida_python-0.0.
|
|
25
|
-
rapida_python-0.0.
|
|
26
|
-
rapida_python-0.0.
|
|
26
|
+
rapida_python-0.0.5.dist-info/METADATA,sha256=Vwc2PNcfz69XcJGvzQKDfSUjeCarRj3KO5EvM_kCti4,2321
|
|
27
|
+
rapida_python-0.0.5.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
28
|
+
rapida_python-0.0.5.dist-info/top_level.txt,sha256=1OJt64VrZ3n2N8GBqlUSoQ3qvPv30QBYD--xOZv3R2g,7
|
|
29
|
+
rapida_python-0.0.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|