sapiopycommons 2025.8.14a703__py3-none-any.whl → 2026.1.22a847__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.
Files changed (57) hide show
  1. sapiopycommons/ai/agent_service_base.py +2051 -0
  2. sapiopycommons/ai/converter_service_base.py +163 -0
  3. sapiopycommons/ai/external_credentials.py +131 -0
  4. sapiopycommons/ai/protoapi/agent/agent_pb2.py +87 -0
  5. sapiopycommons/ai/protoapi/agent/agent_pb2.pyi +282 -0
  6. sapiopycommons/ai/protoapi/agent/agent_pb2_grpc.py +154 -0
  7. sapiopycommons/ai/protoapi/agent/entry_pb2.py +49 -0
  8. sapiopycommons/ai/protoapi/agent/entry_pb2.pyi +40 -0
  9. sapiopycommons/ai/protoapi/agent/entry_pb2_grpc.py +24 -0
  10. sapiopycommons/ai/protoapi/agent/item/item_container_pb2.py +61 -0
  11. sapiopycommons/ai/protoapi/agent/item/item_container_pb2.pyi +181 -0
  12. sapiopycommons/ai/protoapi/agent/item/item_container_pb2_grpc.py +24 -0
  13. sapiopycommons/ai/protoapi/externalcredentials/external_credentials_pb2.py +41 -0
  14. sapiopycommons/ai/protoapi/externalcredentials/external_credentials_pb2.pyi +36 -0
  15. sapiopycommons/ai/protoapi/externalcredentials/external_credentials_pb2_grpc.py +24 -0
  16. sapiopycommons/ai/protoapi/fielddefinitions/fields_pb2.py +51 -0
  17. sapiopycommons/ai/protoapi/fielddefinitions/fields_pb2.pyi +59 -0
  18. sapiopycommons/ai/protoapi/fielddefinitions/fields_pb2_grpc.py +24 -0
  19. sapiopycommons/ai/protoapi/fielddefinitions/velox_field_def_pb2.py +123 -0
  20. sapiopycommons/ai/protoapi/fielddefinitions/velox_field_def_pb2.pyi +599 -0
  21. sapiopycommons/ai/protoapi/fielddefinitions/velox_field_def_pb2_grpc.py +24 -0
  22. sapiopycommons/ai/protoapi/pipeline/converter/converter_pb2.py +59 -0
  23. sapiopycommons/ai/protoapi/pipeline/converter/converter_pb2.pyi +68 -0
  24. sapiopycommons/ai/protoapi/pipeline/converter/converter_pb2_grpc.py +149 -0
  25. sapiopycommons/ai/protoapi/pipeline/script/script_pb2.py +69 -0
  26. sapiopycommons/ai/protoapi/pipeline/script/script_pb2.pyi +109 -0
  27. sapiopycommons/ai/protoapi/pipeline/script/script_pb2_grpc.py +153 -0
  28. sapiopycommons/ai/protoapi/pipeline/step_output_pb2.py +49 -0
  29. sapiopycommons/ai/protoapi/pipeline/step_output_pb2.pyi +56 -0
  30. sapiopycommons/ai/protoapi/pipeline/step_output_pb2_grpc.py +24 -0
  31. sapiopycommons/ai/protoapi/pipeline/step_pb2.py +43 -0
  32. sapiopycommons/ai/protoapi/pipeline/step_pb2.pyi +44 -0
  33. sapiopycommons/ai/protoapi/pipeline/step_pb2_grpc.py +24 -0
  34. sapiopycommons/ai/protoapi/session/sapio_conn_info_pb2.py +39 -0
  35. sapiopycommons/ai/protoapi/session/sapio_conn_info_pb2.pyi +33 -0
  36. sapiopycommons/ai/protoapi/session/sapio_conn_info_pb2_grpc.py +24 -0
  37. sapiopycommons/ai/protobuf_utils.py +583 -0
  38. sapiopycommons/ai/request_validation.py +561 -0
  39. sapiopycommons/ai/server.py +152 -0
  40. sapiopycommons/ai/test_client.py +534 -0
  41. sapiopycommons/callbacks/callback_util.py +26 -7
  42. sapiopycommons/eln/experiment_handler.py +12 -5
  43. sapiopycommons/files/file_util.py +128 -1
  44. sapiopycommons/files/temp_files.py +82 -0
  45. sapiopycommons/general/aliases.py +4 -1
  46. sapiopycommons/general/macros.py +172 -0
  47. sapiopycommons/general/time_util.py +199 -4
  48. sapiopycommons/recordmodel/record_handler.py +47 -12
  49. sapiopycommons/rules/eln_rule_handler.py +3 -0
  50. sapiopycommons/rules/on_save_rule_handler.py +3 -0
  51. sapiopycommons/webhook/webservice_handlers.py +1 -1
  52. {sapiopycommons-2025.8.14a703.dist-info → sapiopycommons-2026.1.22a847.dist-info}/METADATA +2 -2
  53. sapiopycommons-2026.1.22a847.dist-info/RECORD +113 -0
  54. sapiopycommons/ai/tool_of_tools.py +0 -917
  55. sapiopycommons-2025.8.14a703.dist-info/RECORD +0 -72
  56. {sapiopycommons-2025.8.14a703.dist-info → sapiopycommons-2026.1.22a847.dist-info}/WHEEL +0 -0
  57. {sapiopycommons-2025.8.14a703.dist-info → sapiopycommons-2026.1.22a847.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,59 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: sapiopycommons/ai/protoapi/pipeline/converter/converter.proto
5
+ # Protobuf Python Version: 6.31.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 1,
17
+ '',
18
+ 'sapiopycommons/ai/protoapi/pipeline/converter/converter.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from sapiopycommons.ai.protoapi.session import sapio_conn_info_pb2 as sapiopycommons_dot_ai_dot_protoapi_dot_session_dot_sapio__conn__info__pb2
26
+ from sapiopycommons.ai.protoapi.agent.item import item_container_pb2 as sapiopycommons_dot_ai_dot_protoapi_dot_agent_dot_item_dot_item__container__pb2
27
+ try:
28
+ sapiopycommons_dot_ai_dot_protoapi_dot_fielddefinitions_dot_velox__field__def__pb2 = sapiopycommons_dot_ai_dot_protoapi_dot_agent_dot_item_dot_item__container__pb2.sapiopycommons_dot_ai_dot_protoapi_dot_fielddefinitions_dot_velox__field__def__pb2
29
+ except AttributeError:
30
+ sapiopycommons_dot_ai_dot_protoapi_dot_fielddefinitions_dot_velox__field__def__pb2 = sapiopycommons_dot_ai_dot_protoapi_dot_agent_dot_item_dot_item__container__pb2.sapiopycommons.ai.protoapi.fielddefinitions.velox_field_def_pb2
31
+ try:
32
+ sapiopycommons_dot_ai_dot_protoapi_dot_fielddefinitions_dot_fields__pb2 = sapiopycommons_dot_ai_dot_protoapi_dot_agent_dot_item_dot_item__container__pb2.sapiopycommons_dot_ai_dot_protoapi_dot_fielddefinitions_dot_fields__pb2
33
+ except AttributeError:
34
+ sapiopycommons_dot_ai_dot_protoapi_dot_fielddefinitions_dot_fields__pb2 = sapiopycommons_dot_ai_dot_protoapi_dot_agent_dot_item_dot_item__container__pb2.sapiopycommons.ai.protoapi.fielddefinitions.fields_pb2
35
+
36
+ from sapiopycommons.ai.protoapi.session.sapio_conn_info_pb2 import *
37
+ from sapiopycommons.ai.protoapi.agent.item.item_container_pb2 import *
38
+
39
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n=sapiopycommons/ai/protoapi/pipeline/converter/converter.proto\x1a\x38sapiopycommons/ai/protoapi/session/sapio_conn_info.proto\x1a:sapiopycommons/ai/protoapi/agent/item/item_container.proto\"\x1c\n\x1a\x43onverterDetailsRequestPbo\"\x87\x01\n\x12\x43ontentTypePairPbo\x12+\n\x12input_content_type\x18\x01 \x01(\x0b\x32\x0f.ContentTypePbo\x12,\n\x13output_content_type\x18\x02 \x01(\x0b\x32\x0f.ContentTypePbo\x12\x16\n\x0e\x63onverter_name\x18\x03 \x01(\t\"a\n\x1b\x43onverterDetailsResponsePbo\x12,\n\x0fsupported_types\x18\x01 \x03(\x0b\x32\x13.ContentTypePairPbo\x12\x14\n\x0cservice_name\x18\x02 \x01(\t\"p\n\x11\x43onvertRequestPbo\x12-\n\x0eitem_container\x18\x01 \x01(\x0b\x32\x15.StepItemContainerPbo\x12,\n\x13target_content_type\x18\x03 \x01(\x0b\x32\x0f.ContentTypePbo\"C\n\x12\x43onvertResponsePbo\x12-\n\x0eitem_container\x18\x01 \x01(\x0b\x32\x15.StepItemContainerPbo2\x9f\x01\n\x10\x43onverterService\x12P\n\x13GetConverterDetails\x12\x1b.ConverterDetailsRequestPbo\x1a\x1c.ConverterDetailsResponsePbo\x12\x39\n\x0e\x43onvertContent\x12\x12.ConvertRequestPbo\x1a\x13.ConvertResponsePboB)\n%com.velox.protoapi.pipeline.converterP\x01P\x00P\x01\x62\x06proto3')
40
+
41
+ _globals = globals()
42
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
43
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sapiopycommons.ai.protoapi.pipeline.converter.converter_pb2', _globals)
44
+ if not _descriptor._USE_C_DESCRIPTORS:
45
+ _globals['DESCRIPTOR']._loaded_options = None
46
+ _globals['DESCRIPTOR']._serialized_options = b'\n%com.velox.protoapi.pipeline.converterP\001'
47
+ _globals['_CONVERTERDETAILSREQUESTPBO']._serialized_start=183
48
+ _globals['_CONVERTERDETAILSREQUESTPBO']._serialized_end=211
49
+ _globals['_CONTENTTYPEPAIRPBO']._serialized_start=214
50
+ _globals['_CONTENTTYPEPAIRPBO']._serialized_end=349
51
+ _globals['_CONVERTERDETAILSRESPONSEPBO']._serialized_start=351
52
+ _globals['_CONVERTERDETAILSRESPONSEPBO']._serialized_end=448
53
+ _globals['_CONVERTREQUESTPBO']._serialized_start=450
54
+ _globals['_CONVERTREQUESTPBO']._serialized_end=562
55
+ _globals['_CONVERTRESPONSEPBO']._serialized_start=564
56
+ _globals['_CONVERTRESPONSEPBO']._serialized_end=631
57
+ _globals['_CONVERTERSERVICE']._serialized_start=634
58
+ _globals['_CONVERTERSERVICE']._serialized_end=793
59
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,68 @@
1
+ from sapiopycommons.ai.protoapi.session import sapio_conn_info_pb2 as _sapio_conn_info_pb2
2
+ from sapiopycommons.ai.protoapi.agent.item import item_container_pb2 as _item_container_pb2
3
+ from sapiopycommons.ai.protoapi.fielddefinitions import velox_field_def_pb2 as _velox_field_def_pb2
4
+ from sapiopycommons.ai.protoapi.fielddefinitions import fields_pb2 as _fields_pb2
5
+ from google.protobuf.internal import containers as _containers
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import message as _message
8
+ from collections.abc import Iterable as _Iterable, Mapping as _Mapping
9
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
10
+ from sapiopycommons.ai.protoapi.session.sapio_conn_info_pb2 import SapioConnectionInfoPbo as SapioConnectionInfoPbo
11
+ from sapiopycommons.ai.protoapi.session.sapio_conn_info_pb2 import SapioUserSecretTypePbo as SapioUserSecretTypePbo
12
+ from sapiopycommons.ai.protoapi.agent.item.item_container_pb2 import ContentTypePbo as ContentTypePbo
13
+ from sapiopycommons.ai.protoapi.agent.item.item_container_pb2 import StepCsvHeaderRowPbo as StepCsvHeaderRowPbo
14
+ from sapiopycommons.ai.protoapi.agent.item.item_container_pb2 import StepCsvRowPbo as StepCsvRowPbo
15
+ from sapiopycommons.ai.protoapi.agent.item.item_container_pb2 import StepCsvContainerPbo as StepCsvContainerPbo
16
+ from sapiopycommons.ai.protoapi.agent.item.item_container_pb2 import StepJsonContainerPbo as StepJsonContainerPbo
17
+ from sapiopycommons.ai.protoapi.agent.item.item_container_pb2 import StepTextContainerPbo as StepTextContainerPbo
18
+ from sapiopycommons.ai.protoapi.agent.item.item_container_pb2 import StepBinaryContainerPbo as StepBinaryContainerPbo
19
+ from sapiopycommons.ai.protoapi.agent.item.item_container_pb2 import StepImageContainerPbo as StepImageContainerPbo
20
+ from sapiopycommons.ai.protoapi.agent.item.item_container_pb2 import StepDataRecordContainerPbo as StepDataRecordContainerPbo
21
+ from sapiopycommons.ai.protoapi.agent.item.item_container_pb2 import StepItemContainerPbo as StepItemContainerPbo
22
+ from sapiopycommons.ai.protoapi.agent.item.item_container_pb2 import DataTypePbo as DataTypePbo
23
+
24
+ DESCRIPTOR: _descriptor.FileDescriptor
25
+ SESSION_TOKEN: _sapio_conn_info_pb2.SapioUserSecretTypePbo
26
+ PASSWORD: _sapio_conn_info_pb2.SapioUserSecretTypePbo
27
+ BINARY: _item_container_pb2.DataTypePbo
28
+ JSON: _item_container_pb2.DataTypePbo
29
+ CSV: _item_container_pb2.DataTypePbo
30
+ TEXT: _item_container_pb2.DataTypePbo
31
+ IMAGE: _item_container_pb2.DataTypePbo
32
+ DATA_RECORD: _item_container_pb2.DataTypePbo
33
+
34
+ class ConverterDetailsRequestPbo(_message.Message):
35
+ __slots__ = ()
36
+ def __init__(self) -> None: ...
37
+
38
+ class ContentTypePairPbo(_message.Message):
39
+ __slots__ = ("input_content_type", "output_content_type", "converter_name")
40
+ INPUT_CONTENT_TYPE_FIELD_NUMBER: _ClassVar[int]
41
+ OUTPUT_CONTENT_TYPE_FIELD_NUMBER: _ClassVar[int]
42
+ CONVERTER_NAME_FIELD_NUMBER: _ClassVar[int]
43
+ input_content_type: _item_container_pb2.ContentTypePbo
44
+ output_content_type: _item_container_pb2.ContentTypePbo
45
+ converter_name: str
46
+ def __init__(self, input_content_type: _Optional[_Union[_item_container_pb2.ContentTypePbo, _Mapping]] = ..., output_content_type: _Optional[_Union[_item_container_pb2.ContentTypePbo, _Mapping]] = ..., converter_name: _Optional[str] = ...) -> None: ...
47
+
48
+ class ConverterDetailsResponsePbo(_message.Message):
49
+ __slots__ = ("supported_types", "service_name")
50
+ SUPPORTED_TYPES_FIELD_NUMBER: _ClassVar[int]
51
+ SERVICE_NAME_FIELD_NUMBER: _ClassVar[int]
52
+ supported_types: _containers.RepeatedCompositeFieldContainer[ContentTypePairPbo]
53
+ service_name: str
54
+ def __init__(self, supported_types: _Optional[_Iterable[_Union[ContentTypePairPbo, _Mapping]]] = ..., service_name: _Optional[str] = ...) -> None: ...
55
+
56
+ class ConvertRequestPbo(_message.Message):
57
+ __slots__ = ("item_container", "target_content_type")
58
+ ITEM_CONTAINER_FIELD_NUMBER: _ClassVar[int]
59
+ TARGET_CONTENT_TYPE_FIELD_NUMBER: _ClassVar[int]
60
+ item_container: _item_container_pb2.StepItemContainerPbo
61
+ target_content_type: _item_container_pb2.ContentTypePbo
62
+ def __init__(self, item_container: _Optional[_Union[_item_container_pb2.StepItemContainerPbo, _Mapping]] = ..., target_content_type: _Optional[_Union[_item_container_pb2.ContentTypePbo, _Mapping]] = ...) -> None: ...
63
+
64
+ class ConvertResponsePbo(_message.Message):
65
+ __slots__ = ("item_container",)
66
+ ITEM_CONTAINER_FIELD_NUMBER: _ClassVar[int]
67
+ item_container: _item_container_pb2.StepItemContainerPbo
68
+ def __init__(self, item_container: _Optional[_Union[_item_container_pb2.StepItemContainerPbo, _Mapping]] = ...) -> None: ...
@@ -0,0 +1,149 @@
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
+ import warnings
5
+
6
+ from sapiopycommons.ai.protoapi.pipeline.converter import converter_pb2 as sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_converter_dot_converter__pb2
7
+
8
+ GRPC_GENERATED_VERSION = '1.76.0'
9
+ GRPC_VERSION = grpc.__version__
10
+ _version_not_supported = False
11
+
12
+ try:
13
+ from grpc._utilities import first_version_is_lower
14
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
15
+ except ImportError:
16
+ _version_not_supported = True
17
+
18
+ if _version_not_supported:
19
+ raise RuntimeError(
20
+ f'The grpc package installed is at version {GRPC_VERSION},'
21
+ + ' but the generated code in sapiopycommons/ai/protoapi/pipeline/converter/converter_pb2_grpc.py depends on'
22
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
25
+ )
26
+
27
+
28
+ class ConverterServiceStub(object):
29
+ """*
30
+ The ConverterService provides methods to retrieve converter details and perform content conversion between
31
+ different ConteTypes
32
+ """
33
+
34
+ def __init__(self, channel):
35
+ """Constructor.
36
+
37
+ Args:
38
+ channel: A grpc.Channel.
39
+ """
40
+ self.GetConverterDetails = channel.unary_unary(
41
+ '/ConverterService/GetConverterDetails',
42
+ request_serializer=sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_converter_dot_converter__pb2.ConverterDetailsRequestPbo.SerializeToString,
43
+ response_deserializer=sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_converter_dot_converter__pb2.ConverterDetailsResponsePbo.FromString,
44
+ _registered_method=True)
45
+ self.ConvertContent = channel.unary_unary(
46
+ '/ConverterService/ConvertContent',
47
+ request_serializer=sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_converter_dot_converter__pb2.ConvertRequestPbo.SerializeToString,
48
+ response_deserializer=sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_converter_dot_converter__pb2.ConvertResponsePbo.FromString,
49
+ _registered_method=True)
50
+
51
+
52
+ class ConverterServiceServicer(object):
53
+ """*
54
+ The ConverterService provides methods to retrieve converter details and perform content conversion between
55
+ different ConteTypes
56
+ """
57
+
58
+ def GetConverterDetails(self, request, context):
59
+ """Missing associated documentation comment in .proto file."""
60
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
61
+ context.set_details('Method not implemented!')
62
+ raise NotImplementedError('Method not implemented!')
63
+
64
+ def ConvertContent(self, request, context):
65
+ """Missing associated documentation comment in .proto file."""
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_ConverterServiceServicer_to_server(servicer, server):
72
+ rpc_method_handlers = {
73
+ 'GetConverterDetails': grpc.unary_unary_rpc_method_handler(
74
+ servicer.GetConverterDetails,
75
+ request_deserializer=sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_converter_dot_converter__pb2.ConverterDetailsRequestPbo.FromString,
76
+ response_serializer=sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_converter_dot_converter__pb2.ConverterDetailsResponsePbo.SerializeToString,
77
+ ),
78
+ 'ConvertContent': grpc.unary_unary_rpc_method_handler(
79
+ servicer.ConvertContent,
80
+ request_deserializer=sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_converter_dot_converter__pb2.ConvertRequestPbo.FromString,
81
+ response_serializer=sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_converter_dot_converter__pb2.ConvertResponsePbo.SerializeToString,
82
+ ),
83
+ }
84
+ generic_handler = grpc.method_handlers_generic_handler(
85
+ 'ConverterService', rpc_method_handlers)
86
+ server.add_generic_rpc_handlers((generic_handler,))
87
+ server.add_registered_method_handlers('ConverterService', rpc_method_handlers)
88
+
89
+
90
+ # This class is part of an EXPERIMENTAL API.
91
+ class ConverterService(object):
92
+ """*
93
+ The ConverterService provides methods to retrieve converter details and perform content conversion between
94
+ different ConteTypes
95
+ """
96
+
97
+ @staticmethod
98
+ def GetConverterDetails(request,
99
+ target,
100
+ options=(),
101
+ channel_credentials=None,
102
+ call_credentials=None,
103
+ insecure=False,
104
+ compression=None,
105
+ wait_for_ready=None,
106
+ timeout=None,
107
+ metadata=None):
108
+ return grpc.experimental.unary_unary(
109
+ request,
110
+ target,
111
+ '/ConverterService/GetConverterDetails',
112
+ sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_converter_dot_converter__pb2.ConverterDetailsRequestPbo.SerializeToString,
113
+ sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_converter_dot_converter__pb2.ConverterDetailsResponsePbo.FromString,
114
+ options,
115
+ channel_credentials,
116
+ insecure,
117
+ call_credentials,
118
+ compression,
119
+ wait_for_ready,
120
+ timeout,
121
+ metadata,
122
+ _registered_method=True)
123
+
124
+ @staticmethod
125
+ def ConvertContent(request,
126
+ target,
127
+ options=(),
128
+ channel_credentials=None,
129
+ call_credentials=None,
130
+ insecure=False,
131
+ compression=None,
132
+ wait_for_ready=None,
133
+ timeout=None,
134
+ metadata=None):
135
+ return grpc.experimental.unary_unary(
136
+ request,
137
+ target,
138
+ '/ConverterService/ConvertContent',
139
+ sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_converter_dot_converter__pb2.ConvertRequestPbo.SerializeToString,
140
+ sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_converter_dot_converter__pb2.ConvertResponsePbo.FromString,
141
+ options,
142
+ channel_credentials,
143
+ insecure,
144
+ call_credentials,
145
+ compression,
146
+ wait_for_ready,
147
+ timeout,
148
+ metadata,
149
+ _registered_method=True)
@@ -0,0 +1,69 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: sapiopycommons/ai/protoapi/pipeline/script/script.proto
5
+ # Protobuf Python Version: 6.31.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 1,
17
+ '',
18
+ 'sapiopycommons/ai/protoapi/pipeline/script/script.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from sapiopycommons.ai.protoapi.externalcredentials import external_credentials_pb2 as sapiopycommons_dot_ai_dot_protoapi_dot_externalcredentials_dot_external__credentials__pb2
26
+ from sapiopycommons.ai.protoapi.agent import entry_pb2 as sapiopycommons_dot_ai_dot_protoapi_dot_agent_dot_entry__pb2
27
+ try:
28
+ sapiopycommons_dot_ai_dot_protoapi_dot_agent_dot_item_dot_item__container__pb2 = sapiopycommons_dot_ai_dot_protoapi_dot_agent_dot_entry__pb2.sapiopycommons_dot_ai_dot_protoapi_dot_agent_dot_item_dot_item__container__pb2
29
+ except AttributeError:
30
+ sapiopycommons_dot_ai_dot_protoapi_dot_agent_dot_item_dot_item__container__pb2 = sapiopycommons_dot_ai_dot_protoapi_dot_agent_dot_entry__pb2.sapiopycommons.ai.protoapi.agent.item.item_container_pb2
31
+ try:
32
+ sapiopycommons_dot_ai_dot_protoapi_dot_fielddefinitions_dot_velox__field__def__pb2 = sapiopycommons_dot_ai_dot_protoapi_dot_agent_dot_entry__pb2.sapiopycommons_dot_ai_dot_protoapi_dot_fielddefinitions_dot_velox__field__def__pb2
33
+ except AttributeError:
34
+ sapiopycommons_dot_ai_dot_protoapi_dot_fielddefinitions_dot_velox__field__def__pb2 = sapiopycommons_dot_ai_dot_protoapi_dot_agent_dot_entry__pb2.sapiopycommons.ai.protoapi.fielddefinitions.velox_field_def_pb2
35
+ try:
36
+ sapiopycommons_dot_ai_dot_protoapi_dot_fielddefinitions_dot_fields__pb2 = sapiopycommons_dot_ai_dot_protoapi_dot_agent_dot_entry__pb2.sapiopycommons_dot_ai_dot_protoapi_dot_fielddefinitions_dot_fields__pb2
37
+ except AttributeError:
38
+ sapiopycommons_dot_ai_dot_protoapi_dot_fielddefinitions_dot_fields__pb2 = sapiopycommons_dot_ai_dot_protoapi_dot_agent_dot_entry__pb2.sapiopycommons.ai.protoapi.fielddefinitions.fields_pb2
39
+ from sapiopycommons.ai.protoapi.pipeline import step_pb2 as sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_step__pb2
40
+ from sapiopycommons.ai.protoapi.session import sapio_conn_info_pb2 as sapiopycommons_dot_ai_dot_protoapi_dot_session_dot_sapio__conn__info__pb2
41
+
42
+ from sapiopycommons.ai.protoapi.externalcredentials.external_credentials_pb2 import *
43
+ from sapiopycommons.ai.protoapi.agent.entry_pb2 import *
44
+ from sapiopycommons.ai.protoapi.pipeline.step_pb2 import *
45
+ from sapiopycommons.ai.protoapi.session.sapio_conn_info_pb2 import *
46
+
47
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7sapiopycommons/ai/protoapi/pipeline/script/script.proto\x1aIsapiopycommons/ai/protoapi/externalcredentials/external_credentials.proto\x1a,sapiopycommons/ai/protoapi/agent/entry.proto\x1a.sapiopycommons/ai/protoapi/pipeline/step.proto\x1a\x38sapiopycommons/ai/protoapi/session/sapio_conn_info.proto\"A\n\x15ScriptFileContentsPbo\x12\x11\n\tfile_name\x18\x01 \x01(\t\x12\x15\n\rfile_contents\x18\x02 \x01(\x0c\"\xf4\x03\n\x19\x43reateScriptJobRequestPbo\x12+\n\nsapio_user\x18\x01 \x01(\x0b\x32\x17.SapioConnectionInfoPbo\x12\x17\n\x0fscript_language\x18\x02 \x01(\t\x12\x13\n\x0bpipeline_id\x18\x03 \x01(\x03\x12\x18\n\x10pipeline_step_id\x18\x04 \x01(\x03\x12\x15\n\rinvocation_id\x18\x05 \x01(\x03\x12%\n\rinput_configs\x18\x06 \x03(\x0b\x32\x0e.StepIoInfoPbo\x12&\n\x0eoutput_configs\x18\x07 \x03(\x0b\x32\x0e.StepIoInfoPbo\x12\x0f\n\x06script\x18\x80\x08 \x01(\t\x12\x10\n\x07timeout\x18\x81\x08 \x01(\x05\x12\x16\n\rmax_memory_mb\x18\x82\x08 \x01(\x05\x12\x1a\n\x11working_directory\x18\x83\x08 \x01(\t\x12,\n\x0binput_files\x18\x84\x08 \x03(\x0b\x32\x16.ScriptFileContentsPbo\x12\x1c\n\x13\x64ownload_file_names\x18\x85\x08 \x03(\t\x12\x35\n\x13\x65xternal_credential\x18\xdc\x0b \x03(\x0b\x32\x17.ExternalCredentialsPbo\x12\"\n\x05input\x18\xff\x0f \x03(\x0b\x32\x12.StepInputBatchPbo\",\n\x1a\x43reateScriptJobResponsePbo\x12\x0e\n\x06job_id\x18\x01 \x01(\t\"N\n\x10GetJobRequestPbo\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\x12\n\nlog_offset\x18\x02 \x01(\x05\x12\x16\n\x0e\x64ownload_files\x18\x03 \x01(\x08\"\xba\x01\n\x11GetJobResponsePbo\x12\x1a\n\x06status\x18\x01 \x01(\x0e\x32\n.JobStatus\x12\x0b\n\x03log\x18\x02 \x01(\t\x12\x11\n\texception\x18\x03 \x01(\t\x12\x14\n\x0cstep_summary\x18\x0f \x01(\t\x12-\n\x0coutput_files\x18\x84\x08 \x03(\x0b\x32\x16.ScriptFileContentsPbo\x12$\n\x06output\x18\xff\x0f \x03(\x0b\x32\x13.StepOutputBatchPbo*@\n\tJobStatus\x12\x0b\n\x07PENDING\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x32\x8c\x01\n\rScriptService\x12J\n\x0f\x43reateScriptJob\x12\x1a.CreateScriptJobRequestPbo\x1a\x1b.CreateScriptJobResponsePbo\x12/\n\x06GetJob\x12\x11.GetJobRequestPbo\x1a\x12.GetJobResponsePboB$\n\"com.velox.protoapi.pipeline.scriptP\x00P\x01P\x02P\x03\x62\x06proto3')
48
+
49
+ _globals = globals()
50
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
51
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sapiopycommons.ai.protoapi.pipeline.script.script_pb2', _globals)
52
+ if not _descriptor._USE_C_DESCRIPTORS:
53
+ _globals['DESCRIPTOR']._loaded_options = None
54
+ _globals['DESCRIPTOR']._serialized_options = b'\n\"com.velox.protoapi.pipeline.script'
55
+ _globals['_JOBSTATUS']._serialized_start=1171
56
+ _globals['_JOBSTATUS']._serialized_end=1235
57
+ _globals['_SCRIPTFILECONTENTSPBO']._serialized_start=286
58
+ _globals['_SCRIPTFILECONTENTSPBO']._serialized_end=351
59
+ _globals['_CREATESCRIPTJOBREQUESTPBO']._serialized_start=354
60
+ _globals['_CREATESCRIPTJOBREQUESTPBO']._serialized_end=854
61
+ _globals['_CREATESCRIPTJOBRESPONSEPBO']._serialized_start=856
62
+ _globals['_CREATESCRIPTJOBRESPONSEPBO']._serialized_end=900
63
+ _globals['_GETJOBREQUESTPBO']._serialized_start=902
64
+ _globals['_GETJOBREQUESTPBO']._serialized_end=980
65
+ _globals['_GETJOBRESPONSEPBO']._serialized_start=983
66
+ _globals['_GETJOBRESPONSEPBO']._serialized_end=1169
67
+ _globals['_SCRIPTSERVICE']._serialized_start=1238
68
+ _globals['_SCRIPTSERVICE']._serialized_end=1378
69
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,109 @@
1
+ from sapiopycommons.ai.protoapi.externalcredentials import external_credentials_pb2 as _external_credentials_pb2
2
+ from sapiopycommons.ai.protoapi.agent import entry_pb2 as _entry_pb2
3
+ from sapiopycommons.ai.protoapi.agent.item import item_container_pb2 as _item_container_pb2
4
+ from sapiopycommons.ai.protoapi.pipeline import step_pb2 as _step_pb2
5
+ from sapiopycommons.ai.protoapi.session import sapio_conn_info_pb2 as _sapio_conn_info_pb2
6
+ from google.protobuf.internal import containers as _containers
7
+ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
8
+ from google.protobuf import descriptor as _descriptor
9
+ from google.protobuf import message as _message
10
+ from collections.abc import Iterable as _Iterable, Mapping as _Mapping
11
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
12
+ from sapiopycommons.ai.protoapi.externalcredentials.external_credentials_pb2 import ExternalCredentialsPbo as ExternalCredentialsPbo
13
+ from sapiopycommons.ai.protoapi.agent.entry_pb2 import StepInputBatchPbo as StepInputBatchPbo
14
+ from sapiopycommons.ai.protoapi.agent.entry_pb2 import StepOutputBatchPbo as StepOutputBatchPbo
15
+ from sapiopycommons.ai.protoapi.pipeline.step_pb2 import StepIoInfoPbo as StepIoInfoPbo
16
+ from sapiopycommons.ai.protoapi.pipeline.step_pb2 import StepIoDetailsPbo as StepIoDetailsPbo
17
+ from sapiopycommons.ai.protoapi.pipeline.step_pb2 import StepInputDetailsPbo as StepInputDetailsPbo
18
+ from sapiopycommons.ai.protoapi.pipeline.step_pb2 import StepOutputDetailsPbo as StepOutputDetailsPbo
19
+ from sapiopycommons.ai.protoapi.session.sapio_conn_info_pb2 import SapioConnectionInfoPbo as SapioConnectionInfoPbo
20
+ from sapiopycommons.ai.protoapi.session.sapio_conn_info_pb2 import SapioUserSecretTypePbo as SapioUserSecretTypePbo
21
+
22
+ DESCRIPTOR: _descriptor.FileDescriptor
23
+ SESSION_TOKEN: _sapio_conn_info_pb2.SapioUserSecretTypePbo
24
+ PASSWORD: _sapio_conn_info_pb2.SapioUserSecretTypePbo
25
+
26
+ class JobStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
27
+ __slots__ = ()
28
+ PENDING: _ClassVar[JobStatus]
29
+ RUNNING: _ClassVar[JobStatus]
30
+ COMPLETED: _ClassVar[JobStatus]
31
+ FAILED: _ClassVar[JobStatus]
32
+ PENDING: JobStatus
33
+ RUNNING: JobStatus
34
+ COMPLETED: JobStatus
35
+ FAILED: JobStatus
36
+
37
+ class ScriptFileContentsPbo(_message.Message):
38
+ __slots__ = ("file_name", "file_contents")
39
+ FILE_NAME_FIELD_NUMBER: _ClassVar[int]
40
+ FILE_CONTENTS_FIELD_NUMBER: _ClassVar[int]
41
+ file_name: str
42
+ file_contents: bytes
43
+ def __init__(self, file_name: _Optional[str] = ..., file_contents: _Optional[bytes] = ...) -> None: ...
44
+
45
+ class CreateScriptJobRequestPbo(_message.Message):
46
+ __slots__ = ("sapio_user", "script_language", "pipeline_id", "pipeline_step_id", "invocation_id", "input_configs", "output_configs", "script", "timeout", "max_memory_mb", "working_directory", "input_files", "download_file_names", "external_credential", "input")
47
+ SAPIO_USER_FIELD_NUMBER: _ClassVar[int]
48
+ SCRIPT_LANGUAGE_FIELD_NUMBER: _ClassVar[int]
49
+ PIPELINE_ID_FIELD_NUMBER: _ClassVar[int]
50
+ PIPELINE_STEP_ID_FIELD_NUMBER: _ClassVar[int]
51
+ INVOCATION_ID_FIELD_NUMBER: _ClassVar[int]
52
+ INPUT_CONFIGS_FIELD_NUMBER: _ClassVar[int]
53
+ OUTPUT_CONFIGS_FIELD_NUMBER: _ClassVar[int]
54
+ SCRIPT_FIELD_NUMBER: _ClassVar[int]
55
+ TIMEOUT_FIELD_NUMBER: _ClassVar[int]
56
+ MAX_MEMORY_MB_FIELD_NUMBER: _ClassVar[int]
57
+ WORKING_DIRECTORY_FIELD_NUMBER: _ClassVar[int]
58
+ INPUT_FILES_FIELD_NUMBER: _ClassVar[int]
59
+ DOWNLOAD_FILE_NAMES_FIELD_NUMBER: _ClassVar[int]
60
+ EXTERNAL_CREDENTIAL_FIELD_NUMBER: _ClassVar[int]
61
+ INPUT_FIELD_NUMBER: _ClassVar[int]
62
+ sapio_user: _sapio_conn_info_pb2.SapioConnectionInfoPbo
63
+ script_language: str
64
+ pipeline_id: int
65
+ pipeline_step_id: int
66
+ invocation_id: int
67
+ input_configs: _containers.RepeatedCompositeFieldContainer[_step_pb2.StepIoInfoPbo]
68
+ output_configs: _containers.RepeatedCompositeFieldContainer[_step_pb2.StepIoInfoPbo]
69
+ script: str
70
+ timeout: int
71
+ max_memory_mb: int
72
+ working_directory: str
73
+ input_files: _containers.RepeatedCompositeFieldContainer[ScriptFileContentsPbo]
74
+ download_file_names: _containers.RepeatedScalarFieldContainer[str]
75
+ external_credential: _containers.RepeatedCompositeFieldContainer[_external_credentials_pb2.ExternalCredentialsPbo]
76
+ input: _containers.RepeatedCompositeFieldContainer[_entry_pb2.StepInputBatchPbo]
77
+ def __init__(self, sapio_user: _Optional[_Union[_sapio_conn_info_pb2.SapioConnectionInfoPbo, _Mapping]] = ..., script_language: _Optional[str] = ..., pipeline_id: _Optional[int] = ..., pipeline_step_id: _Optional[int] = ..., invocation_id: _Optional[int] = ..., input_configs: _Optional[_Iterable[_Union[_step_pb2.StepIoInfoPbo, _Mapping]]] = ..., output_configs: _Optional[_Iterable[_Union[_step_pb2.StepIoInfoPbo, _Mapping]]] = ..., script: _Optional[str] = ..., timeout: _Optional[int] = ..., max_memory_mb: _Optional[int] = ..., working_directory: _Optional[str] = ..., input_files: _Optional[_Iterable[_Union[ScriptFileContentsPbo, _Mapping]]] = ..., download_file_names: _Optional[_Iterable[str]] = ..., external_credential: _Optional[_Iterable[_Union[_external_credentials_pb2.ExternalCredentialsPbo, _Mapping]]] = ..., input: _Optional[_Iterable[_Union[_entry_pb2.StepInputBatchPbo, _Mapping]]] = ...) -> None: ...
78
+
79
+ class CreateScriptJobResponsePbo(_message.Message):
80
+ __slots__ = ("job_id",)
81
+ JOB_ID_FIELD_NUMBER: _ClassVar[int]
82
+ job_id: str
83
+ def __init__(self, job_id: _Optional[str] = ...) -> None: ...
84
+
85
+ class GetJobRequestPbo(_message.Message):
86
+ __slots__ = ("job_id", "log_offset", "download_files")
87
+ JOB_ID_FIELD_NUMBER: _ClassVar[int]
88
+ LOG_OFFSET_FIELD_NUMBER: _ClassVar[int]
89
+ DOWNLOAD_FILES_FIELD_NUMBER: _ClassVar[int]
90
+ job_id: str
91
+ log_offset: int
92
+ download_files: bool
93
+ def __init__(self, job_id: _Optional[str] = ..., log_offset: _Optional[int] = ..., download_files: bool = ...) -> None: ...
94
+
95
+ class GetJobResponsePbo(_message.Message):
96
+ __slots__ = ("status", "log", "exception", "step_summary", "output_files", "output")
97
+ STATUS_FIELD_NUMBER: _ClassVar[int]
98
+ LOG_FIELD_NUMBER: _ClassVar[int]
99
+ EXCEPTION_FIELD_NUMBER: _ClassVar[int]
100
+ STEP_SUMMARY_FIELD_NUMBER: _ClassVar[int]
101
+ OUTPUT_FILES_FIELD_NUMBER: _ClassVar[int]
102
+ OUTPUT_FIELD_NUMBER: _ClassVar[int]
103
+ status: JobStatus
104
+ log: str
105
+ exception: str
106
+ step_summary: str
107
+ output_files: _containers.RepeatedCompositeFieldContainer[ScriptFileContentsPbo]
108
+ output: _containers.RepeatedCompositeFieldContainer[_entry_pb2.StepOutputBatchPbo]
109
+ def __init__(self, status: _Optional[_Union[JobStatus, str]] = ..., log: _Optional[str] = ..., exception: _Optional[str] = ..., step_summary: _Optional[str] = ..., output_files: _Optional[_Iterable[_Union[ScriptFileContentsPbo, _Mapping]]] = ..., output: _Optional[_Iterable[_Union[_entry_pb2.StepOutputBatchPbo, _Mapping]]] = ...) -> None: ...
@@ -0,0 +1,153 @@
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
+ import warnings
5
+
6
+ from sapiopycommons.ai.protoapi.pipeline.script import script_pb2 as sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_script_dot_script__pb2
7
+
8
+ GRPC_GENERATED_VERSION = '1.76.0'
9
+ GRPC_VERSION = grpc.__version__
10
+ _version_not_supported = False
11
+
12
+ try:
13
+ from grpc._utilities import first_version_is_lower
14
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
15
+ except ImportError:
16
+ _version_not_supported = True
17
+
18
+ if _version_not_supported:
19
+ raise RuntimeError(
20
+ f'The grpc package installed is at version {GRPC_VERSION},'
21
+ + ' but the generated code in sapiopycommons/ai/protoapi/pipeline/script/script_pb2_grpc.py depends on'
22
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
25
+ )
26
+
27
+
28
+ class ScriptServiceStub(object):
29
+ """
30
+ This is the generic service interface that all tools must implement. We will use hostname routing to route the request to the correct tool.
31
+ The other option is for us to use gRPC metadata to route the request to the correct tool. We don't want to expose a bunch of ports and that's
32
+ a pain to manage. So we will use hostname routing for now.
33
+ """
34
+
35
+ def __init__(self, channel):
36
+ """Constructor.
37
+
38
+ Args:
39
+ channel: A grpc.Channel.
40
+ """
41
+ self.CreateScriptJob = channel.unary_unary(
42
+ '/ScriptService/CreateScriptJob',
43
+ request_serializer=sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_script_dot_script__pb2.CreateScriptJobRequestPbo.SerializeToString,
44
+ response_deserializer=sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_script_dot_script__pb2.CreateScriptJobResponsePbo.FromString,
45
+ _registered_method=True)
46
+ self.GetJob = channel.unary_unary(
47
+ '/ScriptService/GetJob',
48
+ request_serializer=sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_script_dot_script__pb2.GetJobRequestPbo.SerializeToString,
49
+ response_deserializer=sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_script_dot_script__pb2.GetJobResponsePbo.FromString,
50
+ _registered_method=True)
51
+
52
+
53
+ class ScriptServiceServicer(object):
54
+ """
55
+ This is the generic service interface that all tools must implement. We will use hostname routing to route the request to the correct tool.
56
+ The other option is for us to use gRPC metadata to route the request to the correct tool. We don't want to expose a bunch of ports and that's
57
+ a pain to manage. So we will use hostname routing for now.
58
+ """
59
+
60
+ def CreateScriptJob(self, request, context):
61
+ """The main entry point for script
62
+ """
63
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
64
+ context.set_details('Method not implemented!')
65
+ raise NotImplementedError('Method not implemented!')
66
+
67
+ def GetJob(self, request, context):
68
+ """Missing associated documentation comment in .proto file."""
69
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
70
+ context.set_details('Method not implemented!')
71
+ raise NotImplementedError('Method not implemented!')
72
+
73
+
74
+ def add_ScriptServiceServicer_to_server(servicer, server):
75
+ rpc_method_handlers = {
76
+ 'CreateScriptJob': grpc.unary_unary_rpc_method_handler(
77
+ servicer.CreateScriptJob,
78
+ request_deserializer=sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_script_dot_script__pb2.CreateScriptJobRequestPbo.FromString,
79
+ response_serializer=sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_script_dot_script__pb2.CreateScriptJobResponsePbo.SerializeToString,
80
+ ),
81
+ 'GetJob': grpc.unary_unary_rpc_method_handler(
82
+ servicer.GetJob,
83
+ request_deserializer=sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_script_dot_script__pb2.GetJobRequestPbo.FromString,
84
+ response_serializer=sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_script_dot_script__pb2.GetJobResponsePbo.SerializeToString,
85
+ ),
86
+ }
87
+ generic_handler = grpc.method_handlers_generic_handler(
88
+ 'ScriptService', rpc_method_handlers)
89
+ server.add_generic_rpc_handlers((generic_handler,))
90
+ server.add_registered_method_handlers('ScriptService', rpc_method_handlers)
91
+
92
+
93
+ # This class is part of an EXPERIMENTAL API.
94
+ class ScriptService(object):
95
+ """
96
+ This is the generic service interface that all tools must implement. We will use hostname routing to route the request to the correct tool.
97
+ The other option is for us to use gRPC metadata to route the request to the correct tool. We don't want to expose a bunch of ports and that's
98
+ a pain to manage. So we will use hostname routing for now.
99
+ """
100
+
101
+ @staticmethod
102
+ def CreateScriptJob(request,
103
+ target,
104
+ options=(),
105
+ channel_credentials=None,
106
+ call_credentials=None,
107
+ insecure=False,
108
+ compression=None,
109
+ wait_for_ready=None,
110
+ timeout=None,
111
+ metadata=None):
112
+ return grpc.experimental.unary_unary(
113
+ request,
114
+ target,
115
+ '/ScriptService/CreateScriptJob',
116
+ sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_script_dot_script__pb2.CreateScriptJobRequestPbo.SerializeToString,
117
+ sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_script_dot_script__pb2.CreateScriptJobResponsePbo.FromString,
118
+ options,
119
+ channel_credentials,
120
+ insecure,
121
+ call_credentials,
122
+ compression,
123
+ wait_for_ready,
124
+ timeout,
125
+ metadata,
126
+ _registered_method=True)
127
+
128
+ @staticmethod
129
+ def GetJob(request,
130
+ target,
131
+ options=(),
132
+ channel_credentials=None,
133
+ call_credentials=None,
134
+ insecure=False,
135
+ compression=None,
136
+ wait_for_ready=None,
137
+ timeout=None,
138
+ metadata=None):
139
+ return grpc.experimental.unary_unary(
140
+ request,
141
+ target,
142
+ '/ScriptService/GetJob',
143
+ sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_script_dot_script__pb2.GetJobRequestPbo.SerializeToString,
144
+ sapiopycommons_dot_ai_dot_protoapi_dot_pipeline_dot_script_dot_script__pb2.GetJobResponsePbo.FromString,
145
+ options,
146
+ channel_credentials,
147
+ insecure,
148
+ call_credentials,
149
+ compression,
150
+ wait_for_ready,
151
+ timeout,
152
+ metadata,
153
+ _registered_method=True)