sapiopycommons 2025.4.25a497__py3-none-any.whl → 2025.4.25a498__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 sapiopycommons might be problematic. Click here for more details.
- sapiopycommons/callbacks/callback_util.py +116 -64
- sapiopycommons/callbacks/field_builder.py +2 -0
- sapiopycommons/customreport/auto_pagers.py +2 -1
- sapiopycommons/customreport/term_builder.py +1 -1
- sapiopycommons/datatype/pseudo_data_types.py +349 -326
- sapiopycommons/eln/experiment_cache.py +188 -0
- sapiopycommons/eln/experiment_handler.py +336 -719
- sapiopycommons/eln/experiment_step_factory.py +476 -0
- sapiopycommons/eln/plate_designer.py +7 -2
- sapiopycommons/eln/step_creation.py +236 -0
- sapiopycommons/files/file_util.py +4 -4
- sapiopycommons/general/accession_service.py +2 -2
- sapiopycommons/general/aliases.py +4 -1
- sapiopycommons/general/data_structure_util.py +115 -0
- sapiopycommons/general/sapio_links.py +4 -12
- sapiopycommons/processtracking/custom_workflow_handler.py +2 -1
- sapiopycommons/recordmodel/record_handler.py +357 -27
- sapiopycommons/rules/eln_rule_handler.py +8 -1
- sapiopycommons/rules/on_save_rule_handler.py +8 -1
- sapiopycommons/webhook/webhook_handlers.py +3 -0
- sapiopycommons/webhook/webservice_handlers.py +2 -2
- {sapiopycommons-2025.4.25a497.dist-info → sapiopycommons-2025.4.25a498.dist-info}/METADATA +2 -2
- sapiopycommons-2025.4.25a498.dist-info/RECORD +67 -0
- sapiopycommons/ai/__init__.py +0 -0
- sapiopycommons/ai/api/fielddefinitions/proto/velox_field_def_pb2.py +0 -123
- sapiopycommons/ai/api/fielddefinitions/proto/velox_field_def_pb2.pyi +0 -598
- sapiopycommons/ai/api/fielddefinitions/proto/velox_field_def_pb2_grpc.py +0 -24
- sapiopycommons/ai/api/plan/proto/step_output_pb2.py +0 -45
- sapiopycommons/ai/api/plan/proto/step_output_pb2.pyi +0 -42
- sapiopycommons/ai/api/plan/proto/step_output_pb2_grpc.py +0 -24
- sapiopycommons/ai/api/plan/proto/step_pb2.py +0 -43
- sapiopycommons/ai/api/plan/proto/step_pb2.pyi +0 -43
- sapiopycommons/ai/api/plan/proto/step_pb2_grpc.py +0 -24
- sapiopycommons/ai/api/plan/script/proto/script_pb2.py +0 -53
- sapiopycommons/ai/api/plan/script/proto/script_pb2.pyi +0 -99
- sapiopycommons/ai/api/plan/script/proto/script_pb2_grpc.py +0 -153
- sapiopycommons/ai/api/plan/tool/proto/entry_pb2.py +0 -57
- sapiopycommons/ai/api/plan/tool/proto/entry_pb2.pyi +0 -96
- sapiopycommons/ai/api/plan/tool/proto/entry_pb2_grpc.py +0 -24
- sapiopycommons/ai/api/plan/tool/proto/tool_pb2.py +0 -73
- sapiopycommons/ai/api/plan/tool/proto/tool_pb2.pyi +0 -242
- sapiopycommons/ai/api/plan/tool/proto/tool_pb2_grpc.py +0 -154
- sapiopycommons/ai/api/session/proto/sapio_conn_info_pb2.py +0 -39
- sapiopycommons/ai/api/session/proto/sapio_conn_info_pb2.pyi +0 -32
- sapiopycommons/ai/api/session/proto/sapio_conn_info_pb2_grpc.py +0 -24
- sapiopycommons/ai/tool_of_tools.py +0 -917
- sapiopycommons/ai/tool_service_base.py +0 -556
- sapiopycommons/general/html_formatter.py +0 -456
- sapiopycommons-2025.4.25a497.dist-info/RECORD +0 -88
- {sapiopycommons-2025.4.25a497.dist-info → sapiopycommons-2025.4.25a498.dist-info}/WHEEL +0 -0
- {sapiopycommons-2025.4.25a497.dist-info → sapiopycommons-2025.4.25a498.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,24 +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
|
-
import warnings
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
GRPC_GENERATED_VERSION = '1.70.0'
|
|
8
|
-
GRPC_VERSION = grpc.__version__
|
|
9
|
-
_version_not_supported = False
|
|
10
|
-
|
|
11
|
-
try:
|
|
12
|
-
from grpc._utilities import first_version_is_lower
|
|
13
|
-
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
14
|
-
except ImportError:
|
|
15
|
-
_version_not_supported = True
|
|
16
|
-
|
|
17
|
-
if _version_not_supported:
|
|
18
|
-
raise RuntimeError(
|
|
19
|
-
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
20
|
-
+ f' but the generated code in sapiopycommons/ai/api/plan/tool/proto/entry_pb2_grpc.py depends on'
|
|
21
|
-
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
22
|
-
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
23
|
-
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
24
|
-
)
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
-
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
-
# source: sapiopycommons/ai/api/plan/tool/proto/tool.proto
|
|
5
|
-
# Protobuf Python Version: 5.29.0
|
|
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
|
-
5,
|
|
15
|
-
29,
|
|
16
|
-
0,
|
|
17
|
-
'',
|
|
18
|
-
'sapiopycommons/ai/api/plan/tool/proto/tool.proto'
|
|
19
|
-
)
|
|
20
|
-
# @@protoc_insertion_point(imports)
|
|
21
|
-
|
|
22
|
-
_sym_db = _symbol_database.Default()
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
from sapiopycommons.ai.api.fielddefinitions.proto import velox_field_def_pb2 as sapiopycommons_dot_ai_dot_api_dot_fielddefinitions_dot_proto_dot_velox__field__def__pb2
|
|
26
|
-
from sapiopycommons.ai.api.plan.tool.proto import entry_pb2 as sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_entry__pb2
|
|
27
|
-
from sapiopycommons.ai.api.plan.proto import step_pb2 as sapiopycommons_dot_ai_dot_api_dot_plan_dot_proto_dot_step__pb2
|
|
28
|
-
from sapiopycommons.ai.api.session.proto import sapio_conn_info_pb2 as sapiopycommons_dot_ai_dot_api_dot_session_dot_proto_dot_sapio__conn__info__pb2
|
|
29
|
-
|
|
30
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import *
|
|
31
|
-
from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import *
|
|
32
|
-
from sapiopycommons.ai.api.plan.proto.step_pb2 import *
|
|
33
|
-
from sapiopycommons.ai.api.session.proto.sapio_conn_info_pb2 import *
|
|
34
|
-
|
|
35
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n0sapiopycommons/ai/api/plan/tool/proto/tool.proto\x1a\x42sapiopycommons/ai/api/fielddefinitions/proto/velox_field_def.proto\x1a\x31sapiopycommons/ai/api/plan/tool/proto/entry.proto\x1a+sapiopycommons/ai/api/plan/proto/step.proto\x1a\x39sapiopycommons/ai/api/session/proto/sapio_conn_info.proto\"w\n\x10ToolIoConfigBase\x12\x14\n\x0c\x63ontent_type\x18\x01 \x01(\t\x12\x11\n\tio_number\x18\x02 \x01(\x05\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x0f\n\x07\x65xample\x18\x05 \x01(\t\"\xd3\x02\n\x10ToolInputDetails\x12&\n\x0b\x62\x61se_config\x18\x01 \x01(\x0b\x32\x11.ToolIoConfigBase\x12\x12\n\nvalidation\x18\x02 \x01(\t\x12\x1c\n\x0fmin_input_count\x18\x03 \x01(\x05H\x00\x88\x01\x01\x12\x1c\n\x0fmax_input_count\x18\x04 \x01(\x05H\x01\x88\x01\x01\x12\r\n\x05paged\x18\x05 \x01(\x08\x12\x1a\n\rmin_page_size\x18\x06 \x01(\x05H\x02\x88\x01\x01\x12\x1a\n\rmax_page_size\x18\x07 \x01(\x05H\x03\x88\x01\x01\x12\x1e\n\x11max_request_bytes\x18\x08 \x01(\x05H\x04\x88\x01\x01\x42\x12\n\x10_min_input_countB\x12\n\x10_max_input_countB\x10\n\x0e_min_page_sizeB\x10\n\x0e_max_page_sizeB\x14\n\x12_max_request_bytes\";\n\x11ToolOutputDetails\x12&\n\x0b\x62\x61se_config\x18\x01 \x01(\x0b\x32\x11.ToolIoConfigBase\"\xa9\x03\n\x12ProcessStepRequest\x12(\n\nsapio_user\x18\x01 \x01(\x0b\x32\x14.SapioConnectionInfo\x12\x11\n\ttool_name\x18\x02 \x01(\t\x12\x18\n\x10plan_instance_id\x18\x03 \x01(\x03\x12\x18\n\x10step_instance_id\x18\x04 \x01(\x03\x12\x15\n\rinvocation_id\x18\x05 \x01(\x03\x12\"\n\rinput_configs\x18\x06 \x03(\x0b\x32\x0b.StepIoInfo\x12#\n\x0eoutput_configs\x18\x07 \x03(\x0b\x32\x0b.StepIoInfo\x12G\n\x13\x63onfig_field_values\x18\x08 \x03(\x0b\x32*.ProcessStepRequest.ConfigFieldValuesEntry\x12(\n\nentry_data\x18\xff\x0f \x03(\x0b\x32\x13.StepEntryInputData\x1aO\n\x16\x43onfigFieldValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.StepRecordFieldValue:\x02\x38\x01\"q\n\x13ProcessStepResponse\x12!\n\x0bnew_records\x18\xfd\x0f \x03(\x0b\x32\x0b.StepRecord\x12\x0c\n\x03log\x18\xfe\x0f \x03(\t\x12)\n\nentry_data\x18\xff\x0f \x03(\x0b\x32\x14.StepEntryOutputData\"C\n\x12ToolDetailsRequest\x12-\n\x0fsapio_conn_info\x18\x01 \x01(\x0b\x32\x14.SapioConnectionInfo\"z\n\x14StepRecordFieldValue\x12\x16\n\x0cstring_value\x18\x0f \x01(\tH\x00\x12\x13\n\tint_value\x18\x0e \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\r \x01(\x01H\x00\x12\x14\n\nbool_value\x18\x0c \x01(\x08H\x00\x42\x07\n\x05\x66ield\"{\n\nStepRecord\x12\'\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x17.StepRecord.FieldsEntry\x1a\x44\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.StepRecordFieldValue:\x02\x38\x01\"\xd1\x01\n\x0bToolDetails\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x1d\n\x15output_data_type_name\x18\x04 \x01(\t\x12(\n\rinput_configs\x18\x05 \x03(\x0b\x32\x11.ToolInputDetails\x12*\n\x0eoutput_configs\x18\x06 \x03(\x0b\x32\x12.ToolOutputDetails\x12*\n\rconfig_fields\x18\x07 \x03(\x0b\x32\x13.VeloxFieldDefProto\"Y\n\x13ToolDetailsResponse\x12\x1e\n\x16tool_framework_version\x18\x01 \x01(\x05\x12\"\n\x0ctool_details\x18\x02 \x03(\x0b\x32\x0c.ToolDetails2\x84\x01\n\x0bToolService\x12;\n\x0eGetToolDetails\x12\x13.ToolDetailsRequest\x1a\x14.ToolDetailsResponse\x12\x38\n\x0bProcessData\x12\x13.ProcessStepRequest\x1a\x14.ProcessStepResponseB!\n\x1d\x63om.velox.api.plan.tool.protoP\x01P\x00P\x01P\x02P\x03\x62\x06proto3')
|
|
36
|
-
|
|
37
|
-
_globals = globals()
|
|
38
|
-
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
39
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sapiopycommons.ai.api.plan.tool.proto.tool_pb2', _globals)
|
|
40
|
-
if not _descriptor._USE_C_DESCRIPTORS:
|
|
41
|
-
_globals['DESCRIPTOR']._loaded_options = None
|
|
42
|
-
_globals['DESCRIPTOR']._serialized_options = b'\n\035com.velox.api.plan.tool.protoP\001'
|
|
43
|
-
_globals['_PROCESSSTEPREQUEST_CONFIGFIELDVALUESENTRY']._loaded_options = None
|
|
44
|
-
_globals['_PROCESSSTEPREQUEST_CONFIGFIELDVALUESENTRY']._serialized_options = b'8\001'
|
|
45
|
-
_globals['_STEPRECORD_FIELDSENTRY']._loaded_options = None
|
|
46
|
-
_globals['_STEPRECORD_FIELDSENTRY']._serialized_options = b'8\001'
|
|
47
|
-
_globals['_TOOLIOCONFIGBASE']._serialized_start=275
|
|
48
|
-
_globals['_TOOLIOCONFIGBASE']._serialized_end=394
|
|
49
|
-
_globals['_TOOLINPUTDETAILS']._serialized_start=397
|
|
50
|
-
_globals['_TOOLINPUTDETAILS']._serialized_end=736
|
|
51
|
-
_globals['_TOOLOUTPUTDETAILS']._serialized_start=738
|
|
52
|
-
_globals['_TOOLOUTPUTDETAILS']._serialized_end=797
|
|
53
|
-
_globals['_PROCESSSTEPREQUEST']._serialized_start=800
|
|
54
|
-
_globals['_PROCESSSTEPREQUEST']._serialized_end=1225
|
|
55
|
-
_globals['_PROCESSSTEPREQUEST_CONFIGFIELDVALUESENTRY']._serialized_start=1146
|
|
56
|
-
_globals['_PROCESSSTEPREQUEST_CONFIGFIELDVALUESENTRY']._serialized_end=1225
|
|
57
|
-
_globals['_PROCESSSTEPRESPONSE']._serialized_start=1227
|
|
58
|
-
_globals['_PROCESSSTEPRESPONSE']._serialized_end=1340
|
|
59
|
-
_globals['_TOOLDETAILSREQUEST']._serialized_start=1342
|
|
60
|
-
_globals['_TOOLDETAILSREQUEST']._serialized_end=1409
|
|
61
|
-
_globals['_STEPRECORDFIELDVALUE']._serialized_start=1411
|
|
62
|
-
_globals['_STEPRECORDFIELDVALUE']._serialized_end=1533
|
|
63
|
-
_globals['_STEPRECORD']._serialized_start=1535
|
|
64
|
-
_globals['_STEPRECORD']._serialized_end=1658
|
|
65
|
-
_globals['_STEPRECORD_FIELDSENTRY']._serialized_start=1590
|
|
66
|
-
_globals['_STEPRECORD_FIELDSENTRY']._serialized_end=1658
|
|
67
|
-
_globals['_TOOLDETAILS']._serialized_start=1661
|
|
68
|
-
_globals['_TOOLDETAILS']._serialized_end=1870
|
|
69
|
-
_globals['_TOOLDETAILSRESPONSE']._serialized_start=1872
|
|
70
|
-
_globals['_TOOLDETAILSRESPONSE']._serialized_end=1961
|
|
71
|
-
_globals['_TOOLSERVICE']._serialized_start=1964
|
|
72
|
-
_globals['_TOOLSERVICE']._serialized_end=2096
|
|
73
|
-
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
from sapiopycommons.ai.api.fielddefinitions.proto import velox_field_def_pb2 as _velox_field_def_pb2
|
|
2
|
-
from sapiopycommons.ai.api.plan.tool.proto import entry_pb2 as _entry_pb2
|
|
3
|
-
from sapiopycommons.ai.api.plan.proto import step_pb2 as _step_pb2
|
|
4
|
-
from sapiopycommons.ai.api.session.proto import sapio_conn_info_pb2 as _sapio_conn_info_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 typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
9
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import FieldValidatorProto as FieldValidatorProto
|
|
10
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import ColorRangeProto as ColorRangeProto
|
|
11
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import BooleanDependentFieldEntry as BooleanDependentFieldEntry
|
|
12
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import SelectionDependentFieldEntry as SelectionDependentFieldEntry
|
|
13
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import EnumDependentFieldEntry as EnumDependentFieldEntry
|
|
14
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import ProcessDetailEntry as ProcessDetailEntry
|
|
15
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import BooleanProperties as BooleanProperties
|
|
16
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import DateProperties as DateProperties
|
|
17
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import DoubleProperties as DoubleProperties
|
|
18
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import IntegerProperties as IntegerProperties
|
|
19
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import LongProperties as LongProperties
|
|
20
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import ShortProperties as ShortProperties
|
|
21
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import SelectionProperties as SelectionProperties
|
|
22
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import StringProperties as StringProperties
|
|
23
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import SideLinkProperties as SideLinkProperties
|
|
24
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import PickListProperties as PickListProperties
|
|
25
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import ParentLinkProperties as ParentLinkProperties
|
|
26
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import MultiParentProperties as MultiParentProperties
|
|
27
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import IdentifierProperties as IdentifierProperties
|
|
28
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import FileBlobProperties as FileBlobProperties
|
|
29
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import EnumProperties as EnumProperties
|
|
30
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import DateRangeProperties as DateRangeProperties
|
|
31
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import ChildLinkProperties as ChildLinkProperties
|
|
32
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import ActionStringProperties as ActionStringProperties
|
|
33
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import ActionProperties as ActionProperties
|
|
34
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import AccessionProperties as AccessionProperties
|
|
35
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import VeloxFieldDefProto as VeloxFieldDefProto
|
|
36
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import VeloxFieldDefProtoList as VeloxFieldDefProtoList
|
|
37
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import FieldTypeProto as FieldTypeProto
|
|
38
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import SortDirectionProto as SortDirectionProto
|
|
39
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import FontSizeProto as FontSizeProto
|
|
40
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import TextDecorationProto as TextDecorationProto
|
|
41
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import StringFormatProto as StringFormatProto
|
|
42
|
-
from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import DoubleFormatProto as DoubleFormatProto
|
|
43
|
-
from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepCsvHeaderRow as StepCsvHeaderRow
|
|
44
|
-
from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepCsvRow as StepCsvRow
|
|
45
|
-
from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepCsvData as StepCsvData
|
|
46
|
-
from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepJsonData as StepJsonData
|
|
47
|
-
from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepTextData as StepTextData
|
|
48
|
-
from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepBinaryData as StepBinaryData
|
|
49
|
-
from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepImageData as StepImageData
|
|
50
|
-
from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepEntryData as StepEntryData
|
|
51
|
-
from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepEntryInputData as StepEntryInputData
|
|
52
|
-
from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepEntryOutputData as StepEntryOutputData
|
|
53
|
-
from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import DataType as DataType
|
|
54
|
-
from sapiopycommons.ai.api.plan.proto.step_pb2 import StepIoInfo as StepIoInfo
|
|
55
|
-
from sapiopycommons.ai.api.plan.proto.step_pb2 import StepIoDetails as StepIoDetails
|
|
56
|
-
from sapiopycommons.ai.api.plan.proto.step_pb2 import StepInputDetails as StepInputDetails
|
|
57
|
-
from sapiopycommons.ai.api.plan.proto.step_pb2 import StepOutputDetails as StepOutputDetails
|
|
58
|
-
from sapiopycommons.ai.api.session.proto.sapio_conn_info_pb2 import SapioConnectionInfo as SapioConnectionInfo
|
|
59
|
-
from sapiopycommons.ai.api.session.proto.sapio_conn_info_pb2 import SapioUserSecretType as SapioUserSecretType
|
|
60
|
-
|
|
61
|
-
DESCRIPTOR: _descriptor.FileDescriptor
|
|
62
|
-
FIELD_TYPE_UNSPECIFIED: _velox_field_def_pb2.FieldTypeProto
|
|
63
|
-
BOOLEAN: _velox_field_def_pb2.FieldTypeProto
|
|
64
|
-
DOUBLE: _velox_field_def_pb2.FieldTypeProto
|
|
65
|
-
ENUM: _velox_field_def_pb2.FieldTypeProto
|
|
66
|
-
LONG: _velox_field_def_pb2.FieldTypeProto
|
|
67
|
-
INTEGER: _velox_field_def_pb2.FieldTypeProto
|
|
68
|
-
SHORT: _velox_field_def_pb2.FieldTypeProto
|
|
69
|
-
STRING: _velox_field_def_pb2.FieldTypeProto
|
|
70
|
-
DATE: _velox_field_def_pb2.FieldTypeProto
|
|
71
|
-
ACTION: _velox_field_def_pb2.FieldTypeProto
|
|
72
|
-
SELECTION: _velox_field_def_pb2.FieldTypeProto
|
|
73
|
-
PARENTLINK: _velox_field_def_pb2.FieldTypeProto
|
|
74
|
-
IDENTIFIER: _velox_field_def_pb2.FieldTypeProto
|
|
75
|
-
PICKLIST: _velox_field_def_pb2.FieldTypeProto
|
|
76
|
-
LINK: _velox_field_def_pb2.FieldTypeProto
|
|
77
|
-
MULTIPARENTLINK: _velox_field_def_pb2.FieldTypeProto
|
|
78
|
-
CHILDLINK: _velox_field_def_pb2.FieldTypeProto
|
|
79
|
-
AUTO_ACCESSION: _velox_field_def_pb2.FieldTypeProto
|
|
80
|
-
DATE_RANGE: _velox_field_def_pb2.FieldTypeProto
|
|
81
|
-
SIDE_LINK: _velox_field_def_pb2.FieldTypeProto
|
|
82
|
-
ACTION_STRING: _velox_field_def_pb2.FieldTypeProto
|
|
83
|
-
FILE_BLOB: _velox_field_def_pb2.FieldTypeProto
|
|
84
|
-
SORT_DIRECTION_UNSPECIFIED: _velox_field_def_pb2.SortDirectionProto
|
|
85
|
-
SORT_DIRECTION_ASCENDING: _velox_field_def_pb2.SortDirectionProto
|
|
86
|
-
SORT_DIRECTION_DESCENDING: _velox_field_def_pb2.SortDirectionProto
|
|
87
|
-
SORT_DIRECTION_NONE: _velox_field_def_pb2.SortDirectionProto
|
|
88
|
-
FONT_SIZE_UNSPECIFIED: _velox_field_def_pb2.FontSizeProto
|
|
89
|
-
FONT_SIZE_SMALL: _velox_field_def_pb2.FontSizeProto
|
|
90
|
-
FONT_SIZE_MEDIUM: _velox_field_def_pb2.FontSizeProto
|
|
91
|
-
FONT_SIZE_LARGE: _velox_field_def_pb2.FontSizeProto
|
|
92
|
-
TEXT_DECORATION_UNSPECIFIED: _velox_field_def_pb2.TextDecorationProto
|
|
93
|
-
TEXT_DECORATION_NONE: _velox_field_def_pb2.TextDecorationProto
|
|
94
|
-
TEXT_DECORATION_UNDERLINE: _velox_field_def_pb2.TextDecorationProto
|
|
95
|
-
TEXT_DECORATION_STRIKETHROUGH: _velox_field_def_pb2.TextDecorationProto
|
|
96
|
-
STRING_FORMAT_UNSPECIFIED: _velox_field_def_pb2.StringFormatProto
|
|
97
|
-
STRING_FORMAT_PHONE: _velox_field_def_pb2.StringFormatProto
|
|
98
|
-
STRING_FORMAT_EMAIL: _velox_field_def_pb2.StringFormatProto
|
|
99
|
-
DOUBLE_FORMAT_UNSPECIFIED: _velox_field_def_pb2.DoubleFormatProto
|
|
100
|
-
DOUBLE_FORMAT_CURRENCY: _velox_field_def_pb2.DoubleFormatProto
|
|
101
|
-
DOUBLE_FORMAT_PERCENTAGE: _velox_field_def_pb2.DoubleFormatProto
|
|
102
|
-
BINARY: _entry_pb2.DataType
|
|
103
|
-
JSON: _entry_pb2.DataType
|
|
104
|
-
CSV: _entry_pb2.DataType
|
|
105
|
-
TEXT: _entry_pb2.DataType
|
|
106
|
-
IMAGE: _entry_pb2.DataType
|
|
107
|
-
SESSION_TOKEN: _sapio_conn_info_pb2.SapioUserSecretType
|
|
108
|
-
PASSWORD: _sapio_conn_info_pb2.SapioUserSecretType
|
|
109
|
-
|
|
110
|
-
class ToolIoConfigBase(_message.Message):
|
|
111
|
-
__slots__ = ("content_type", "io_number", "display_name", "description", "example")
|
|
112
|
-
CONTENT_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
113
|
-
IO_NUMBER_FIELD_NUMBER: _ClassVar[int]
|
|
114
|
-
DISPLAY_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
115
|
-
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
|
|
116
|
-
EXAMPLE_FIELD_NUMBER: _ClassVar[int]
|
|
117
|
-
content_type: str
|
|
118
|
-
io_number: int
|
|
119
|
-
display_name: str
|
|
120
|
-
description: str
|
|
121
|
-
example: str
|
|
122
|
-
def __init__(self, content_type: _Optional[str] = ..., io_number: _Optional[int] = ..., display_name: _Optional[str] = ..., description: _Optional[str] = ..., example: _Optional[str] = ...) -> None: ...
|
|
123
|
-
|
|
124
|
-
class ToolInputDetails(_message.Message):
|
|
125
|
-
__slots__ = ("base_config", "validation", "min_input_count", "max_input_count", "paged", "min_page_size", "max_page_size", "max_request_bytes")
|
|
126
|
-
BASE_CONFIG_FIELD_NUMBER: _ClassVar[int]
|
|
127
|
-
VALIDATION_FIELD_NUMBER: _ClassVar[int]
|
|
128
|
-
MIN_INPUT_COUNT_FIELD_NUMBER: _ClassVar[int]
|
|
129
|
-
MAX_INPUT_COUNT_FIELD_NUMBER: _ClassVar[int]
|
|
130
|
-
PAGED_FIELD_NUMBER: _ClassVar[int]
|
|
131
|
-
MIN_PAGE_SIZE_FIELD_NUMBER: _ClassVar[int]
|
|
132
|
-
MAX_PAGE_SIZE_FIELD_NUMBER: _ClassVar[int]
|
|
133
|
-
MAX_REQUEST_BYTES_FIELD_NUMBER: _ClassVar[int]
|
|
134
|
-
base_config: ToolIoConfigBase
|
|
135
|
-
validation: str
|
|
136
|
-
min_input_count: int
|
|
137
|
-
max_input_count: int
|
|
138
|
-
paged: bool
|
|
139
|
-
min_page_size: int
|
|
140
|
-
max_page_size: int
|
|
141
|
-
max_request_bytes: int
|
|
142
|
-
def __init__(self, base_config: _Optional[_Union[ToolIoConfigBase, _Mapping]] = ..., validation: _Optional[str] = ..., min_input_count: _Optional[int] = ..., max_input_count: _Optional[int] = ..., paged: bool = ..., min_page_size: _Optional[int] = ..., max_page_size: _Optional[int] = ..., max_request_bytes: _Optional[int] = ...) -> None: ...
|
|
143
|
-
|
|
144
|
-
class ToolOutputDetails(_message.Message):
|
|
145
|
-
__slots__ = ("base_config",)
|
|
146
|
-
BASE_CONFIG_FIELD_NUMBER: _ClassVar[int]
|
|
147
|
-
base_config: ToolIoConfigBase
|
|
148
|
-
def __init__(self, base_config: _Optional[_Union[ToolIoConfigBase, _Mapping]] = ...) -> None: ...
|
|
149
|
-
|
|
150
|
-
class ProcessStepRequest(_message.Message):
|
|
151
|
-
__slots__ = ("sapio_user", "tool_name", "plan_instance_id", "step_instance_id", "invocation_id", "input_configs", "output_configs", "config_field_values", "entry_data")
|
|
152
|
-
class ConfigFieldValuesEntry(_message.Message):
|
|
153
|
-
__slots__ = ("key", "value")
|
|
154
|
-
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
155
|
-
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
156
|
-
key: str
|
|
157
|
-
value: StepRecordFieldValue
|
|
158
|
-
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[StepRecordFieldValue, _Mapping]] = ...) -> None: ...
|
|
159
|
-
SAPIO_USER_FIELD_NUMBER: _ClassVar[int]
|
|
160
|
-
TOOL_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
161
|
-
PLAN_INSTANCE_ID_FIELD_NUMBER: _ClassVar[int]
|
|
162
|
-
STEP_INSTANCE_ID_FIELD_NUMBER: _ClassVar[int]
|
|
163
|
-
INVOCATION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
164
|
-
INPUT_CONFIGS_FIELD_NUMBER: _ClassVar[int]
|
|
165
|
-
OUTPUT_CONFIGS_FIELD_NUMBER: _ClassVar[int]
|
|
166
|
-
CONFIG_FIELD_VALUES_FIELD_NUMBER: _ClassVar[int]
|
|
167
|
-
ENTRY_DATA_FIELD_NUMBER: _ClassVar[int]
|
|
168
|
-
sapio_user: _sapio_conn_info_pb2.SapioConnectionInfo
|
|
169
|
-
tool_name: str
|
|
170
|
-
plan_instance_id: int
|
|
171
|
-
step_instance_id: int
|
|
172
|
-
invocation_id: int
|
|
173
|
-
input_configs: _containers.RepeatedCompositeFieldContainer[_step_pb2.StepIoInfo]
|
|
174
|
-
output_configs: _containers.RepeatedCompositeFieldContainer[_step_pb2.StepIoInfo]
|
|
175
|
-
config_field_values: _containers.MessageMap[str, StepRecordFieldValue]
|
|
176
|
-
entry_data: _containers.RepeatedCompositeFieldContainer[_entry_pb2.StepEntryInputData]
|
|
177
|
-
def __init__(self, sapio_user: _Optional[_Union[_sapio_conn_info_pb2.SapioConnectionInfo, _Mapping]] = ..., tool_name: _Optional[str] = ..., plan_instance_id: _Optional[int] = ..., step_instance_id: _Optional[int] = ..., invocation_id: _Optional[int] = ..., input_configs: _Optional[_Iterable[_Union[_step_pb2.StepIoInfo, _Mapping]]] = ..., output_configs: _Optional[_Iterable[_Union[_step_pb2.StepIoInfo, _Mapping]]] = ..., config_field_values: _Optional[_Mapping[str, StepRecordFieldValue]] = ..., entry_data: _Optional[_Iterable[_Union[_entry_pb2.StepEntryInputData, _Mapping]]] = ...) -> None: ...
|
|
178
|
-
|
|
179
|
-
class ProcessStepResponse(_message.Message):
|
|
180
|
-
__slots__ = ("new_records", "log", "entry_data")
|
|
181
|
-
NEW_RECORDS_FIELD_NUMBER: _ClassVar[int]
|
|
182
|
-
LOG_FIELD_NUMBER: _ClassVar[int]
|
|
183
|
-
ENTRY_DATA_FIELD_NUMBER: _ClassVar[int]
|
|
184
|
-
new_records: _containers.RepeatedCompositeFieldContainer[StepRecord]
|
|
185
|
-
log: _containers.RepeatedScalarFieldContainer[str]
|
|
186
|
-
entry_data: _containers.RepeatedCompositeFieldContainer[_entry_pb2.StepEntryOutputData]
|
|
187
|
-
def __init__(self, new_records: _Optional[_Iterable[_Union[StepRecord, _Mapping]]] = ..., log: _Optional[_Iterable[str]] = ..., entry_data: _Optional[_Iterable[_Union[_entry_pb2.StepEntryOutputData, _Mapping]]] = ...) -> None: ...
|
|
188
|
-
|
|
189
|
-
class ToolDetailsRequest(_message.Message):
|
|
190
|
-
__slots__ = ("sapio_conn_info",)
|
|
191
|
-
SAPIO_CONN_INFO_FIELD_NUMBER: _ClassVar[int]
|
|
192
|
-
sapio_conn_info: _sapio_conn_info_pb2.SapioConnectionInfo
|
|
193
|
-
def __init__(self, sapio_conn_info: _Optional[_Union[_sapio_conn_info_pb2.SapioConnectionInfo, _Mapping]] = ...) -> None: ...
|
|
194
|
-
|
|
195
|
-
class StepRecordFieldValue(_message.Message):
|
|
196
|
-
__slots__ = ("string_value", "int_value", "double_value", "bool_value")
|
|
197
|
-
STRING_VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
198
|
-
INT_VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
199
|
-
DOUBLE_VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
200
|
-
BOOL_VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
201
|
-
string_value: str
|
|
202
|
-
int_value: int
|
|
203
|
-
double_value: float
|
|
204
|
-
bool_value: bool
|
|
205
|
-
def __init__(self, string_value: _Optional[str] = ..., int_value: _Optional[int] = ..., double_value: _Optional[float] = ..., bool_value: bool = ...) -> None: ...
|
|
206
|
-
|
|
207
|
-
class StepRecord(_message.Message):
|
|
208
|
-
__slots__ = ("fields",)
|
|
209
|
-
class FieldsEntry(_message.Message):
|
|
210
|
-
__slots__ = ("key", "value")
|
|
211
|
-
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
212
|
-
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
213
|
-
key: str
|
|
214
|
-
value: StepRecordFieldValue
|
|
215
|
-
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[StepRecordFieldValue, _Mapping]] = ...) -> None: ...
|
|
216
|
-
FIELDS_FIELD_NUMBER: _ClassVar[int]
|
|
217
|
-
fields: _containers.MessageMap[str, StepRecordFieldValue]
|
|
218
|
-
def __init__(self, fields: _Optional[_Mapping[str, StepRecordFieldValue]] = ...) -> None: ...
|
|
219
|
-
|
|
220
|
-
class ToolDetails(_message.Message):
|
|
221
|
-
__slots__ = ("name", "description", "output_data_type_name", "input_configs", "output_configs", "config_fields")
|
|
222
|
-
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
223
|
-
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
|
|
224
|
-
OUTPUT_DATA_TYPE_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
225
|
-
INPUT_CONFIGS_FIELD_NUMBER: _ClassVar[int]
|
|
226
|
-
OUTPUT_CONFIGS_FIELD_NUMBER: _ClassVar[int]
|
|
227
|
-
CONFIG_FIELDS_FIELD_NUMBER: _ClassVar[int]
|
|
228
|
-
name: str
|
|
229
|
-
description: str
|
|
230
|
-
output_data_type_name: str
|
|
231
|
-
input_configs: _containers.RepeatedCompositeFieldContainer[ToolInputDetails]
|
|
232
|
-
output_configs: _containers.RepeatedCompositeFieldContainer[ToolOutputDetails]
|
|
233
|
-
config_fields: _containers.RepeatedCompositeFieldContainer[_velox_field_def_pb2.VeloxFieldDefProto]
|
|
234
|
-
def __init__(self, name: _Optional[str] = ..., description: _Optional[str] = ..., output_data_type_name: _Optional[str] = ..., input_configs: _Optional[_Iterable[_Union[ToolInputDetails, _Mapping]]] = ..., output_configs: _Optional[_Iterable[_Union[ToolOutputDetails, _Mapping]]] = ..., config_fields: _Optional[_Iterable[_Union[_velox_field_def_pb2.VeloxFieldDefProto, _Mapping]]] = ...) -> None: ...
|
|
235
|
-
|
|
236
|
-
class ToolDetailsResponse(_message.Message):
|
|
237
|
-
__slots__ = ("tool_framework_version", "tool_details")
|
|
238
|
-
TOOL_FRAMEWORK_VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
239
|
-
TOOL_DETAILS_FIELD_NUMBER: _ClassVar[int]
|
|
240
|
-
tool_framework_version: int
|
|
241
|
-
tool_details: _containers.RepeatedCompositeFieldContainer[ToolDetails]
|
|
242
|
-
def __init__(self, tool_framework_version: _Optional[int] = ..., tool_details: _Optional[_Iterable[_Union[ToolDetails, _Mapping]]] = ...) -> None: ...
|
|
@@ -1,154 +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
|
-
import warnings
|
|
5
|
-
|
|
6
|
-
from sapiopycommons.ai.api.plan.tool.proto import tool_pb2 as sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2
|
|
7
|
-
|
|
8
|
-
GRPC_GENERATED_VERSION = '1.70.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
|
-
+ f' but the generated code in sapiopycommons/ai/api/plan/tool/proto/tool_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 ToolServiceStub(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.GetToolDetails = channel.unary_unary(
|
|
42
|
-
'/ToolService/GetToolDetails',
|
|
43
|
-
request_serializer=sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ToolDetailsRequest.SerializeToString,
|
|
44
|
-
response_deserializer=sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ToolDetailsResponse.FromString,
|
|
45
|
-
_registered_method=True)
|
|
46
|
-
self.ProcessData = channel.unary_unary(
|
|
47
|
-
'/ToolService/ProcessData',
|
|
48
|
-
request_serializer=sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ProcessStepRequest.SerializeToString,
|
|
49
|
-
response_deserializer=sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ProcessStepResponse.FromString,
|
|
50
|
-
_registered_method=True)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
class ToolServiceServicer(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 GetToolDetails(self, request, context):
|
|
61
|
-
"""This allows for a tool to self-describe itself, which allows for the UI to be automatically populated with this information
|
|
62
|
-
"""
|
|
63
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
64
|
-
context.set_details('Method not implemented!')
|
|
65
|
-
raise NotImplementedError('Method not implemented!')
|
|
66
|
-
|
|
67
|
-
def ProcessData(self, request, context):
|
|
68
|
-
"""This is the main entry point for a tool to be called
|
|
69
|
-
"""
|
|
70
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
71
|
-
context.set_details('Method not implemented!')
|
|
72
|
-
raise NotImplementedError('Method not implemented!')
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
def add_ToolServiceServicer_to_server(servicer, server):
|
|
76
|
-
rpc_method_handlers = {
|
|
77
|
-
'GetToolDetails': grpc.unary_unary_rpc_method_handler(
|
|
78
|
-
servicer.GetToolDetails,
|
|
79
|
-
request_deserializer=sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ToolDetailsRequest.FromString,
|
|
80
|
-
response_serializer=sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ToolDetailsResponse.SerializeToString,
|
|
81
|
-
),
|
|
82
|
-
'ProcessData': grpc.unary_unary_rpc_method_handler(
|
|
83
|
-
servicer.ProcessData,
|
|
84
|
-
request_deserializer=sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ProcessStepRequest.FromString,
|
|
85
|
-
response_serializer=sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ProcessStepResponse.SerializeToString,
|
|
86
|
-
),
|
|
87
|
-
}
|
|
88
|
-
generic_handler = grpc.method_handlers_generic_handler(
|
|
89
|
-
'ToolService', rpc_method_handlers)
|
|
90
|
-
server.add_generic_rpc_handlers((generic_handler,))
|
|
91
|
-
server.add_registered_method_handlers('ToolService', rpc_method_handlers)
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
# This class is part of an EXPERIMENTAL API.
|
|
95
|
-
class ToolService(object):
|
|
96
|
-
"""
|
|
97
|
-
This is the generic service interface that all tools must implement. We will use hostname routing to route the request to the correct tool.
|
|
98
|
-
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
|
|
99
|
-
a pain to manage. So we will use hostname routing for now.
|
|
100
|
-
"""
|
|
101
|
-
|
|
102
|
-
@staticmethod
|
|
103
|
-
def GetToolDetails(request,
|
|
104
|
-
target,
|
|
105
|
-
options=(),
|
|
106
|
-
channel_credentials=None,
|
|
107
|
-
call_credentials=None,
|
|
108
|
-
insecure=False,
|
|
109
|
-
compression=None,
|
|
110
|
-
wait_for_ready=None,
|
|
111
|
-
timeout=None,
|
|
112
|
-
metadata=None):
|
|
113
|
-
return grpc.experimental.unary_unary(
|
|
114
|
-
request,
|
|
115
|
-
target,
|
|
116
|
-
'/ToolService/GetToolDetails',
|
|
117
|
-
sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ToolDetailsRequest.SerializeToString,
|
|
118
|
-
sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ToolDetailsResponse.FromString,
|
|
119
|
-
options,
|
|
120
|
-
channel_credentials,
|
|
121
|
-
insecure,
|
|
122
|
-
call_credentials,
|
|
123
|
-
compression,
|
|
124
|
-
wait_for_ready,
|
|
125
|
-
timeout,
|
|
126
|
-
metadata,
|
|
127
|
-
_registered_method=True)
|
|
128
|
-
|
|
129
|
-
@staticmethod
|
|
130
|
-
def ProcessData(request,
|
|
131
|
-
target,
|
|
132
|
-
options=(),
|
|
133
|
-
channel_credentials=None,
|
|
134
|
-
call_credentials=None,
|
|
135
|
-
insecure=False,
|
|
136
|
-
compression=None,
|
|
137
|
-
wait_for_ready=None,
|
|
138
|
-
timeout=None,
|
|
139
|
-
metadata=None):
|
|
140
|
-
return grpc.experimental.unary_unary(
|
|
141
|
-
request,
|
|
142
|
-
target,
|
|
143
|
-
'/ToolService/ProcessData',
|
|
144
|
-
sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ProcessStepRequest.SerializeToString,
|
|
145
|
-
sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ProcessStepResponse.FromString,
|
|
146
|
-
options,
|
|
147
|
-
channel_credentials,
|
|
148
|
-
insecure,
|
|
149
|
-
call_credentials,
|
|
150
|
-
compression,
|
|
151
|
-
wait_for_ready,
|
|
152
|
-
timeout,
|
|
153
|
-
metadata,
|
|
154
|
-
_registered_method=True)
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
-
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
-
# source: sapiopycommons/ai/api/session/proto/sapio_conn_info.proto
|
|
5
|
-
# Protobuf Python Version: 5.29.0
|
|
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
|
-
5,
|
|
15
|
-
29,
|
|
16
|
-
0,
|
|
17
|
-
'',
|
|
18
|
-
'sapiopycommons/ai/api/session/proto/sapio_conn_info.proto'
|
|
19
|
-
)
|
|
20
|
-
# @@protoc_insertion_point(imports)
|
|
21
|
-
|
|
22
|
-
_sym_db = _symbol_database.Default()
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n9sapiopycommons/ai/api/session/proto/sapio_conn_info.proto\"\xb0\x01\n\x13SapioConnectionInfo\x12\x16\n\x0ewebservice_url\x18\x01 \x01(\t\x12\x10\n\x08rmi_host\x18\x02 \x03(\t\x12\x10\n\x08rmi_port\x18\x03 \x01(\x05\x12\x10\n\x08\x61pp_guid\x18\x04 \x01(\t\x12\x10\n\x08username\x18\x05 \x01(\t\x12)\n\x0bsecret_type\x18\x06 \x01(\x0e\x32\x14.SapioUserSecretType\x12\x0e\n\x06secret\x18\x07 \x01(\t*6\n\x13SapioUserSecretType\x12\x11\n\rSESSION_TOKEN\x10\x00\x12\x0c\n\x08PASSWORD\x10\x01\x42\x1f\n\x1b\x63om.velox.api.session.protoP\x01\x62\x06proto3')
|
|
28
|
-
|
|
29
|
-
_globals = globals()
|
|
30
|
-
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sapiopycommons.ai.api.session.proto.sapio_conn_info_pb2', _globals)
|
|
32
|
-
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
-
_globals['DESCRIPTOR']._loaded_options = None
|
|
34
|
-
_globals['DESCRIPTOR']._serialized_options = b'\n\033com.velox.api.session.protoP\001'
|
|
35
|
-
_globals['_SAPIOUSERSECRETTYPE']._serialized_start=240
|
|
36
|
-
_globals['_SAPIOUSERSECRETTYPE']._serialized_end=294
|
|
37
|
-
_globals['_SAPIOCONNECTIONINFO']._serialized_start=62
|
|
38
|
-
_globals['_SAPIOCONNECTIONINFO']._serialized_end=238
|
|
39
|
-
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
from google.protobuf.internal import containers as _containers
|
|
2
|
-
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
|
3
|
-
from google.protobuf import descriptor as _descriptor
|
|
4
|
-
from google.protobuf import message as _message
|
|
5
|
-
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Optional as _Optional, Union as _Union
|
|
6
|
-
|
|
7
|
-
DESCRIPTOR: _descriptor.FileDescriptor
|
|
8
|
-
|
|
9
|
-
class SapioUserSecretType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
10
|
-
__slots__ = ()
|
|
11
|
-
SESSION_TOKEN: _ClassVar[SapioUserSecretType]
|
|
12
|
-
PASSWORD: _ClassVar[SapioUserSecretType]
|
|
13
|
-
SESSION_TOKEN: SapioUserSecretType
|
|
14
|
-
PASSWORD: SapioUserSecretType
|
|
15
|
-
|
|
16
|
-
class SapioConnectionInfo(_message.Message):
|
|
17
|
-
__slots__ = ("webservice_url", "rmi_host", "rmi_port", "app_guid", "username", "secret_type", "secret")
|
|
18
|
-
WEBSERVICE_URL_FIELD_NUMBER: _ClassVar[int]
|
|
19
|
-
RMI_HOST_FIELD_NUMBER: _ClassVar[int]
|
|
20
|
-
RMI_PORT_FIELD_NUMBER: _ClassVar[int]
|
|
21
|
-
APP_GUID_FIELD_NUMBER: _ClassVar[int]
|
|
22
|
-
USERNAME_FIELD_NUMBER: _ClassVar[int]
|
|
23
|
-
SECRET_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
24
|
-
SECRET_FIELD_NUMBER: _ClassVar[int]
|
|
25
|
-
webservice_url: str
|
|
26
|
-
rmi_host: _containers.RepeatedScalarFieldContainer[str]
|
|
27
|
-
rmi_port: int
|
|
28
|
-
app_guid: str
|
|
29
|
-
username: str
|
|
30
|
-
secret_type: SapioUserSecretType
|
|
31
|
-
secret: str
|
|
32
|
-
def __init__(self, webservice_url: _Optional[str] = ..., rmi_host: _Optional[_Iterable[str]] = ..., rmi_port: _Optional[int] = ..., app_guid: _Optional[str] = ..., username: _Optional[str] = ..., secret_type: _Optional[_Union[SapioUserSecretType, str]] = ..., secret: _Optional[str] = ...) -> None: ...
|
|
@@ -1,24 +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
|
-
import warnings
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
GRPC_GENERATED_VERSION = '1.70.0'
|
|
8
|
-
GRPC_VERSION = grpc.__version__
|
|
9
|
-
_version_not_supported = False
|
|
10
|
-
|
|
11
|
-
try:
|
|
12
|
-
from grpc._utilities import first_version_is_lower
|
|
13
|
-
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
14
|
-
except ImportError:
|
|
15
|
-
_version_not_supported = True
|
|
16
|
-
|
|
17
|
-
if _version_not_supported:
|
|
18
|
-
raise RuntimeError(
|
|
19
|
-
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
20
|
-
+ f' but the generated code in sapiopycommons/ai/api/session/proto/sapio_conn_info_pb2_grpc.py depends on'
|
|
21
|
-
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
22
|
-
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
23
|
-
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
24
|
-
)
|