sapiopycommons 2025.4.17a488__py3-none-any.whl → 2025.4.22a490__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.

Files changed (48) hide show
  1. sapiopycommons/ai/__init__.py +0 -0
  2. sapiopycommons/ai/api/plan/proto/step_output_pb2.py +45 -0
  3. sapiopycommons/ai/api/plan/proto/step_output_pb2.pyi +42 -0
  4. sapiopycommons/ai/api/plan/proto/step_output_pb2_grpc.py +24 -0
  5. sapiopycommons/ai/api/plan/proto/step_pb2.py +43 -0
  6. sapiopycommons/ai/api/plan/proto/step_pb2.pyi +43 -0
  7. sapiopycommons/ai/api/plan/proto/step_pb2_grpc.py +24 -0
  8. sapiopycommons/ai/api/plan/script/proto/script_pb2.py +51 -0
  9. sapiopycommons/ai/api/plan/script/proto/script_pb2.pyi +73 -0
  10. sapiopycommons/ai/api/plan/script/proto/script_pb2_grpc.py +153 -0
  11. sapiopycommons/ai/api/plan/tool/proto/entry_pb2.py +57 -0
  12. sapiopycommons/ai/api/plan/tool/proto/entry_pb2.pyi +96 -0
  13. sapiopycommons/ai/api/plan/tool/proto/entry_pb2_grpc.py +24 -0
  14. sapiopycommons/ai/api/plan/tool/proto/tool_pb2.py +61 -0
  15. sapiopycommons/ai/api/plan/tool/proto/tool_pb2.pyi +114 -0
  16. sapiopycommons/ai/api/plan/tool/proto/tool_pb2_grpc.py +154 -0
  17. sapiopycommons/ai/api/session/proto/sapio_conn_info_pb2.py +39 -0
  18. sapiopycommons/ai/api/session/proto/sapio_conn_info_pb2.pyi +32 -0
  19. sapiopycommons/ai/api/session/proto/sapio_conn_info_pb2_grpc.py +24 -0
  20. sapiopycommons/ai/tool_of_tools.py +917 -0
  21. sapiopycommons/ai/tool_service_base.py +271 -0
  22. sapiopycommons/callbacks/callback_util.py +64 -116
  23. sapiopycommons/callbacks/field_builder.py +0 -2
  24. sapiopycommons/customreport/auto_pagers.py +1 -2
  25. sapiopycommons/customreport/term_builder.py +1 -1
  26. sapiopycommons/datatype/pseudo_data_types.py +326 -349
  27. sapiopycommons/eln/experiment_handler.py +719 -336
  28. sapiopycommons/eln/plate_designer.py +2 -7
  29. sapiopycommons/files/file_util.py +4 -4
  30. sapiopycommons/general/accession_service.py +2 -2
  31. sapiopycommons/general/aliases.py +1 -4
  32. sapiopycommons/general/html_formatter.py +456 -0
  33. sapiopycommons/general/sapio_links.py +12 -4
  34. sapiopycommons/processtracking/custom_workflow_handler.py +1 -2
  35. sapiopycommons/recordmodel/record_handler.py +27 -357
  36. sapiopycommons/rules/eln_rule_handler.py +1 -8
  37. sapiopycommons/rules/on_save_rule_handler.py +1 -8
  38. sapiopycommons/webhook/webhook_handlers.py +0 -3
  39. sapiopycommons/webhook/webservice_handlers.py +2 -2
  40. {sapiopycommons-2025.4.17a488.dist-info → sapiopycommons-2025.4.22a490.dist-info}/METADATA +2 -2
  41. sapiopycommons-2025.4.22a490.dist-info/RECORD +85 -0
  42. sapiopycommons/eln/experiment_cache.py +0 -188
  43. sapiopycommons/eln/experiment_step_factory.py +0 -476
  44. sapiopycommons/eln/step_creation.py +0 -236
  45. sapiopycommons/general/data_structure_util.py +0 -115
  46. sapiopycommons-2025.4.17a488.dist-info/RECORD +0 -67
  47. {sapiopycommons-2025.4.17a488.dist-info → sapiopycommons-2025.4.22a490.dist-info}/WHEEL +0 -0
  48. {sapiopycommons-2025.4.17a488.dist-info → sapiopycommons-2025.4.22a490.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,96 @@
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, Mapping as _Mapping, Optional as _Optional, Union as _Union
6
+
7
+ DESCRIPTOR: _descriptor.FileDescriptor
8
+
9
+ class DataType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
10
+ __slots__ = ()
11
+ BINARY: _ClassVar[DataType]
12
+ JSON: _ClassVar[DataType]
13
+ CSV: _ClassVar[DataType]
14
+ TEXT: _ClassVar[DataType]
15
+ IMAGE: _ClassVar[DataType]
16
+ BINARY: DataType
17
+ JSON: DataType
18
+ CSV: DataType
19
+ TEXT: DataType
20
+ IMAGE: DataType
21
+
22
+ class StepCsvHeaderRow(_message.Message):
23
+ __slots__ = ("cells",)
24
+ CELLS_FIELD_NUMBER: _ClassVar[int]
25
+ cells: _containers.RepeatedScalarFieldContainer[str]
26
+ def __init__(self, cells: _Optional[_Iterable[str]] = ...) -> None: ...
27
+
28
+ class StepCsvRow(_message.Message):
29
+ __slots__ = ("cells",)
30
+ CELLS_FIELD_NUMBER: _ClassVar[int]
31
+ cells: _containers.RepeatedScalarFieldContainer[str]
32
+ def __init__(self, cells: _Optional[_Iterable[str]] = ...) -> None: ...
33
+
34
+ class StepCsvData(_message.Message):
35
+ __slots__ = ("header", "entries")
36
+ HEADER_FIELD_NUMBER: _ClassVar[int]
37
+ ENTRIES_FIELD_NUMBER: _ClassVar[int]
38
+ header: StepCsvHeaderRow
39
+ entries: _containers.RepeatedCompositeFieldContainer[StepCsvRow]
40
+ def __init__(self, header: _Optional[_Union[StepCsvHeaderRow, _Mapping]] = ..., entries: _Optional[_Iterable[_Union[StepCsvRow, _Mapping]]] = ...) -> None: ...
41
+
42
+ class StepJsonData(_message.Message):
43
+ __slots__ = ("entries",)
44
+ ENTRIES_FIELD_NUMBER: _ClassVar[int]
45
+ entries: _containers.RepeatedScalarFieldContainer[str]
46
+ def __init__(self, entries: _Optional[_Iterable[str]] = ...) -> None: ...
47
+
48
+ class StepTextData(_message.Message):
49
+ __slots__ = ("entries",)
50
+ ENTRIES_FIELD_NUMBER: _ClassVar[int]
51
+ entries: _containers.RepeatedScalarFieldContainer[str]
52
+ def __init__(self, entries: _Optional[_Iterable[str]] = ...) -> None: ...
53
+
54
+ class StepBinaryData(_message.Message):
55
+ __slots__ = ("entries",)
56
+ ENTRIES_FIELD_NUMBER: _ClassVar[int]
57
+ entries: _containers.RepeatedScalarFieldContainer[bytes]
58
+ def __init__(self, entries: _Optional[_Iterable[bytes]] = ...) -> None: ...
59
+
60
+ class StepImageData(_message.Message):
61
+ __slots__ = ("image_format", "entries")
62
+ IMAGE_FORMAT_FIELD_NUMBER: _ClassVar[int]
63
+ ENTRIES_FIELD_NUMBER: _ClassVar[int]
64
+ image_format: str
65
+ entries: _containers.RepeatedScalarFieldContainer[bytes]
66
+ def __init__(self, image_format: _Optional[str] = ..., entries: _Optional[_Iterable[bytes]] = ...) -> None: ...
67
+
68
+ class StepEntryData(_message.Message):
69
+ __slots__ = ("dataType", "binary_data", "csv_data", "json_data", "text_data", "image_data")
70
+ DATATYPE_FIELD_NUMBER: _ClassVar[int]
71
+ BINARY_DATA_FIELD_NUMBER: _ClassVar[int]
72
+ CSV_DATA_FIELD_NUMBER: _ClassVar[int]
73
+ JSON_DATA_FIELD_NUMBER: _ClassVar[int]
74
+ TEXT_DATA_FIELD_NUMBER: _ClassVar[int]
75
+ IMAGE_DATA_FIELD_NUMBER: _ClassVar[int]
76
+ dataType: DataType
77
+ binary_data: StepBinaryData
78
+ csv_data: StepCsvData
79
+ json_data: StepJsonData
80
+ text_data: StepTextData
81
+ image_data: StepImageData
82
+ def __init__(self, dataType: _Optional[_Union[DataType, str]] = ..., binary_data: _Optional[_Union[StepBinaryData, _Mapping]] = ..., csv_data: _Optional[_Union[StepCsvData, _Mapping]] = ..., json_data: _Optional[_Union[StepJsonData, _Mapping]] = ..., text_data: _Optional[_Union[StepTextData, _Mapping]] = ..., image_data: _Optional[_Union[StepImageData, _Mapping]] = ...) -> None: ...
83
+
84
+ class StepEntryInputData(_message.Message):
85
+ __slots__ = ("is_partial", "entry_data")
86
+ IS_PARTIAL_FIELD_NUMBER: _ClassVar[int]
87
+ ENTRY_DATA_FIELD_NUMBER: _ClassVar[int]
88
+ is_partial: bool
89
+ entry_data: StepEntryData
90
+ def __init__(self, is_partial: bool = ..., entry_data: _Optional[_Union[StepEntryData, _Mapping]] = ...) -> None: ...
91
+
92
+ class StepEntryOutputData(_message.Message):
93
+ __slots__ = ("entry_data",)
94
+ ENTRY_DATA_FIELD_NUMBER: _ClassVar[int]
95
+ entry_data: StepEntryData
96
+ def __init__(self, entry_data: _Optional[_Union[StepEntryData, _Mapping]] = ...) -> None: ...
@@ -0,0 +1,24 @@
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.71.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 com/velox/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
+ )
@@ -0,0 +1,61 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: com/velox/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
+ 'com/velox/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.plan.tool.proto import entry_pb2 as com_dot_velox_dot_api_dot_plan_dot_tool_dot_proto_dot_entry__pb2
26
+ from sapiopycommons.ai.api.plan.proto import step_pb2 as com_dot_velox_dot_api_dot_plan_dot_proto_dot_step__pb2
27
+ from sapiopycommons.ai.api.session.proto import sapio_conn_info_pb2 as com_dot_velox_dot_api_dot_session_dot_proto_dot_sapio__conn__info__pb2
28
+
29
+ from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import *
30
+ from sapiopycommons.ai.api.plan.proto.step_pb2 import *
31
+ from sapiopycommons.ai.api.session.proto.sapio_conn_info_pb2 import *
32
+
33
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(com/velox/api/plan/tool/proto/tool.proto\x1a)com/velox/api/plan/tool/proto/entry.proto\x1a#com/velox/api/plan/proto/step.proto\x1a\x31\x63om/velox/api/session/proto/sapio_conn_info.proto\"\x8f\x02\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\x12(\n\nentry_data\x18\xff\x0f \x03(\x0b\x32\x13.StepEntryInputData\"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\"\x7f\n\x0bToolDetails\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12%\n\rinput_configs\x18\x04 \x03(\x0b\x32\x0e.StepIoDetails\x12&\n\x0eoutput_configs\x18\x05 \x03(\x0b\x32\x0e.StepIoDetails\"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\x02\x62\x06proto3')
34
+
35
+ _globals = globals()
36
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
37
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sapiopycommons.ai.api.plan.tool.proto.tool_pb2', _globals)
38
+ if not _descriptor._USE_C_DESCRIPTORS:
39
+ _globals['DESCRIPTOR']._loaded_options = None
40
+ _globals['DESCRIPTOR']._serialized_options = b'\n\035sapiopycommons.ai.api.plan.tool.protoP\001'
41
+ _globals['_STEPRECORD_FIELDSENTRY']._loaded_options = None
42
+ _globals['_STEPRECORD_FIELDSENTRY']._serialized_options = b'8\001'
43
+ _globals['_PROCESSSTEPREQUEST']._serialized_start=176
44
+ _globals['_PROCESSSTEPREQUEST']._serialized_end=447
45
+ _globals['_PROCESSSTEPRESPONSE']._serialized_start=449
46
+ _globals['_PROCESSSTEPRESPONSE']._serialized_end=562
47
+ _globals['_TOOLDETAILSREQUEST']._serialized_start=564
48
+ _globals['_TOOLDETAILSREQUEST']._serialized_end=631
49
+ _globals['_STEPRECORDFIELDVALUE']._serialized_start=633
50
+ _globals['_STEPRECORDFIELDVALUE']._serialized_end=755
51
+ _globals['_STEPRECORD']._serialized_start=757
52
+ _globals['_STEPRECORD']._serialized_end=880
53
+ _globals['_STEPRECORD_FIELDSENTRY']._serialized_start=812
54
+ _globals['_STEPRECORD_FIELDSENTRY']._serialized_end=880
55
+ _globals['_TOOLDETAILS']._serialized_start=882
56
+ _globals['_TOOLDETAILS']._serialized_end=1009
57
+ _globals['_TOOLDETAILSRESPONSE']._serialized_start=1011
58
+ _globals['_TOOLDETAILSRESPONSE']._serialized_end=1100
59
+ _globals['_TOOLSERVICE']._serialized_start=1103
60
+ _globals['_TOOLSERVICE']._serialized_end=1235
61
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,114 @@
1
+ from sapiopycommons.ai.api.plan.tool.proto import entry_pb2 as _entry_pb2
2
+ from sapiopycommons.ai.api.plan.proto import step_pb2 as _step_pb2
3
+ from sapiopycommons.ai.api.session.proto import sapio_conn_info_pb2 as _sapio_conn_info_pb2
4
+ from google.protobuf.internal import containers as _containers
5
+ from google.protobuf import descriptor as _descriptor
6
+ from google.protobuf import message as _message
7
+ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
8
+ from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepCsvHeaderRow as StepCsvHeaderRow
9
+ from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepCsvRow as StepCsvRow
10
+ from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepCsvData as StepCsvData
11
+ from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepJsonData as StepJsonData
12
+ from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepTextData as StepTextData
13
+ from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepBinaryData as StepBinaryData
14
+ from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepImageData as StepImageData
15
+ from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepEntryData as StepEntryData
16
+ from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepEntryInputData as StepEntryInputData
17
+ from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepEntryOutputData as StepEntryOutputData
18
+ from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import DataType as DataType
19
+ from sapiopycommons.ai.api.plan.proto.step_pb2 import StepIoInfo as StepIoInfo
20
+ from sapiopycommons.ai.api.plan.proto.step_pb2 import StepIoDetails as StepIoDetails
21
+ from sapiopycommons.ai.api.plan.proto.step_pb2 import StepInputDetails as StepInputDetails
22
+ from sapiopycommons.ai.api.plan.proto.step_pb2 import StepOutputDetails as StepOutputDetails
23
+ from sapiopycommons.ai.api.session.proto.sapio_conn_info_pb2 import SapioConnectionInfo as SapioConnectionInfo
24
+ from sapiopycommons.ai.api.session.proto.sapio_conn_info_pb2 import SapioUserSecretType as SapioUserSecretType
25
+
26
+ DESCRIPTOR: _descriptor.FileDescriptor
27
+ BINARY: _entry_pb2.DataType
28
+ JSON: _entry_pb2.DataType
29
+ CSV: _entry_pb2.DataType
30
+ TEXT: _entry_pb2.DataType
31
+ IMAGE: _entry_pb2.DataType
32
+ SESSION_TOKEN: _sapio_conn_info_pb2.SapioUserSecretType
33
+ PASSWORD: _sapio_conn_info_pb2.SapioUserSecretType
34
+
35
+ class ProcessStepRequest(_message.Message):
36
+ __slots__ = ("sapio_user", "tool_name", "plan_instance_id", "step_instance_id", "invocation_id", "input_configs", "output_configs", "entry_data")
37
+ SAPIO_USER_FIELD_NUMBER: _ClassVar[int]
38
+ TOOL_NAME_FIELD_NUMBER: _ClassVar[int]
39
+ PLAN_INSTANCE_ID_FIELD_NUMBER: _ClassVar[int]
40
+ STEP_INSTANCE_ID_FIELD_NUMBER: _ClassVar[int]
41
+ INVOCATION_ID_FIELD_NUMBER: _ClassVar[int]
42
+ INPUT_CONFIGS_FIELD_NUMBER: _ClassVar[int]
43
+ OUTPUT_CONFIGS_FIELD_NUMBER: _ClassVar[int]
44
+ ENTRY_DATA_FIELD_NUMBER: _ClassVar[int]
45
+ sapio_user: _sapio_conn_info_pb2.SapioConnectionInfo
46
+ tool_name: str
47
+ plan_instance_id: int
48
+ step_instance_id: int
49
+ invocation_id: int
50
+ input_configs: _containers.RepeatedCompositeFieldContainer[_step_pb2.StepIoInfo]
51
+ output_configs: _containers.RepeatedCompositeFieldContainer[_step_pb2.StepIoInfo]
52
+ entry_data: _containers.RepeatedCompositeFieldContainer[_entry_pb2.StepEntryInputData]
53
+ 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]]] = ..., entry_data: _Optional[_Iterable[_Union[_entry_pb2.StepEntryInputData, _Mapping]]] = ...) -> None: ...
54
+
55
+ class ProcessStepResponse(_message.Message):
56
+ __slots__ = ("new_records", "log", "entry_data")
57
+ NEW_RECORDS_FIELD_NUMBER: _ClassVar[int]
58
+ LOG_FIELD_NUMBER: _ClassVar[int]
59
+ ENTRY_DATA_FIELD_NUMBER: _ClassVar[int]
60
+ new_records: _containers.RepeatedCompositeFieldContainer[StepRecord]
61
+ log: _containers.RepeatedScalarFieldContainer[str]
62
+ entry_data: _containers.RepeatedCompositeFieldContainer[_entry_pb2.StepEntryOutputData]
63
+ def __init__(self, new_records: _Optional[_Iterable[_Union[StepRecord, _Mapping]]] = ..., log: _Optional[_Iterable[str]] = ..., entry_data: _Optional[_Iterable[_Union[_entry_pb2.StepEntryOutputData, _Mapping]]] = ...) -> None: ...
64
+
65
+ class ToolDetailsRequest(_message.Message):
66
+ __slots__ = ("sapio_conn_info",)
67
+ SAPIO_CONN_INFO_FIELD_NUMBER: _ClassVar[int]
68
+ sapio_conn_info: _sapio_conn_info_pb2.SapioConnectionInfo
69
+ def __init__(self, sapio_conn_info: _Optional[_Union[_sapio_conn_info_pb2.SapioConnectionInfo, _Mapping]] = ...) -> None: ...
70
+
71
+ class StepRecordFieldValue(_message.Message):
72
+ __slots__ = ("string_value", "int_value", "double_value", "bool_value")
73
+ STRING_VALUE_FIELD_NUMBER: _ClassVar[int]
74
+ INT_VALUE_FIELD_NUMBER: _ClassVar[int]
75
+ DOUBLE_VALUE_FIELD_NUMBER: _ClassVar[int]
76
+ BOOL_VALUE_FIELD_NUMBER: _ClassVar[int]
77
+ string_value: str
78
+ int_value: int
79
+ double_value: float
80
+ bool_value: bool
81
+ def __init__(self, string_value: _Optional[str] = ..., int_value: _Optional[int] = ..., double_value: _Optional[float] = ..., bool_value: bool = ...) -> None: ...
82
+
83
+ class StepRecord(_message.Message):
84
+ __slots__ = ("fields",)
85
+ class FieldsEntry(_message.Message):
86
+ __slots__ = ("key", "value")
87
+ KEY_FIELD_NUMBER: _ClassVar[int]
88
+ VALUE_FIELD_NUMBER: _ClassVar[int]
89
+ key: str
90
+ value: StepRecordFieldValue
91
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[StepRecordFieldValue, _Mapping]] = ...) -> None: ...
92
+ FIELDS_FIELD_NUMBER: _ClassVar[int]
93
+ fields: _containers.MessageMap[str, StepRecordFieldValue]
94
+ def __init__(self, fields: _Optional[_Mapping[str, StepRecordFieldValue]] = ...) -> None: ...
95
+
96
+ class ToolDetails(_message.Message):
97
+ __slots__ = ("name", "description", "input_configs", "output_configs")
98
+ NAME_FIELD_NUMBER: _ClassVar[int]
99
+ DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
100
+ INPUT_CONFIGS_FIELD_NUMBER: _ClassVar[int]
101
+ OUTPUT_CONFIGS_FIELD_NUMBER: _ClassVar[int]
102
+ name: str
103
+ description: str
104
+ input_configs: _containers.RepeatedCompositeFieldContainer[_step_pb2.StepIoDetails]
105
+ output_configs: _containers.RepeatedCompositeFieldContainer[_step_pb2.StepIoDetails]
106
+ def __init__(self, name: _Optional[str] = ..., description: _Optional[str] = ..., input_configs: _Optional[_Iterable[_Union[_step_pb2.StepIoDetails, _Mapping]]] = ..., output_configs: _Optional[_Iterable[_Union[_step_pb2.StepIoDetails, _Mapping]]] = ...) -> None: ...
107
+
108
+ class ToolDetailsResponse(_message.Message):
109
+ __slots__ = ("tool_framework_version", "tool_details")
110
+ TOOL_FRAMEWORK_VERSION_FIELD_NUMBER: _ClassVar[int]
111
+ TOOL_DETAILS_FIELD_NUMBER: _ClassVar[int]
112
+ tool_framework_version: int
113
+ tool_details: _containers.RepeatedCompositeFieldContainer[ToolDetails]
114
+ def __init__(self, tool_framework_version: _Optional[int] = ..., tool_details: _Optional[_Iterable[_Union[ToolDetails, _Mapping]]] = ...) -> None: ...
@@ -0,0 +1,154 @@
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 com_dot_velox_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2
7
+
8
+ GRPC_GENERATED_VERSION = '1.71.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 com/velox/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=com_dot_velox_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ToolDetailsRequest.SerializeToString,
44
+ response_deserializer=com_dot_velox_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=com_dot_velox_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ProcessStepRequest.SerializeToString,
49
+ response_deserializer=com_dot_velox_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=com_dot_velox_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ToolDetailsRequest.FromString,
80
+ response_serializer=com_dot_velox_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=com_dot_velox_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ProcessStepRequest.FromString,
85
+ response_serializer=com_dot_velox_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
+ com_dot_velox_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ToolDetailsRequest.SerializeToString,
118
+ com_dot_velox_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
+ com_dot_velox_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ProcessStepRequest.SerializeToString,
145
+ com_dot_velox_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)
@@ -0,0 +1,39 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: com/velox/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
+ 'com/velox/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'\n1com/velox/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\033sapiopycommons.ai.api.session.protoP\001'
35
+ _globals['_SAPIOUSERSECRETTYPE']._serialized_start=232
36
+ _globals['_SAPIOUSERSECRETTYPE']._serialized_end=286
37
+ _globals['_SAPIOCONNECTIONINFO']._serialized_start=54
38
+ _globals['_SAPIOCONNECTIONINFO']._serialized_end=230
39
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,32 @@
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: ...
@@ -0,0 +1,24 @@
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.71.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 com/velox/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
+ )