another-ayx-python-sdk 2.4.2__py3-none-any.whl → 2.4.22__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.
- another_ayx_python_sdk/version.py +3 -3
- {another_ayx_python_sdk-2.4.2.dist-info → another_ayx_python_sdk-2.4.22.dist-info}/METADATA +1 -1
- another_ayx_python_sdk-2.4.22.dist-info/RECORD +813 -0
- {another_ayx_python_sdk-2.4.2.dist-info → another_ayx_python_sdk-2.4.22.dist-info}/top_level.txt +2 -0
- build/lib/another_ayx_python_sdk/__init__.py +14 -0
- build/lib/another_ayx_python_sdk/__main__.py +470 -0
- build/lib/another_ayx_python_sdk/assets/workspace_files/__init__.py +14 -0
- build/lib/another_ayx_python_sdk/assets/workspace_files/setup.py +38 -0
- build/lib/another_ayx_python_sdk/cli/__init__.py +14 -0
- build/lib/another_ayx_python_sdk/cli/utilities.py +103 -0
- build/lib/another_ayx_python_sdk/cli/workspace.py +266 -0
- build/lib/another_ayx_python_sdk/cli/yxi_builder.py +125 -0
- build/lib/another_ayx_python_sdk/cli/yxi_installer.py +45 -0
- build/lib/another_ayx_python_sdk/core/__init__.py +51 -0
- build/lib/another_ayx_python_sdk/core/constants.py +25 -0
- build/lib/another_ayx_python_sdk/core/dcm_base.py +115 -0
- build/lib/another_ayx_python_sdk/core/doc_utilities.py +40 -0
- build/lib/another_ayx_python_sdk/core/environment_base.py +213 -0
- build/lib/another_ayx_python_sdk/core/exceptions.py +59 -0
- build/lib/another_ayx_python_sdk/core/field.py +183 -0
- build/lib/another_ayx_python_sdk/core/input_anchor_base.py +86 -0
- build/lib/another_ayx_python_sdk/core/input_connection_base.py +206 -0
- build/lib/another_ayx_python_sdk/core/io_base.py +139 -0
- build/lib/another_ayx_python_sdk/core/metadata.py +173 -0
- build/lib/another_ayx_python_sdk/core/observable_mixin.py +90 -0
- build/lib/another_ayx_python_sdk/core/output_anchor_base.py +151 -0
- build/lib/another_ayx_python_sdk/core/plugin.py +108 -0
- build/lib/another_ayx_python_sdk/core/plugin_v2.py +97 -0
- build/lib/another_ayx_python_sdk/core/provider_base.py +125 -0
- build/lib/another_ayx_python_sdk/core/proxy_requests.py +51 -0
- build/lib/another_ayx_python_sdk/core/record_packet.py +88 -0
- build/lib/another_ayx_python_sdk/core/record_packet_base.py +123 -0
- build/lib/another_ayx_python_sdk/core/register_plugin.py +127 -0
- build/lib/another_ayx_python_sdk/core/testing.py +191 -0
- build/lib/another_ayx_python_sdk/core/utils.py +146 -0
- build/lib/another_ayx_python_sdk/examples/AyxSdkInput/main.py +89 -0
- build/lib/another_ayx_python_sdk/examples/AyxSdkMultiConnectionsMultiOutputAnchor/main.py +102 -0
- build/lib/another_ayx_python_sdk/examples/AyxSdkMultipleInputAnchors/main.py +84 -0
- build/lib/another_ayx_python_sdk/examples/AyxSdkMultipleOutputAnchors/main.py +96 -0
- build/lib/another_ayx_python_sdk/examples/AyxSdkOptionalInputAnchor/main.py +94 -0
- build/lib/another_ayx_python_sdk/examples/AyxSdkOutput/main.py +78 -0
- build/lib/another_ayx_python_sdk/examples/AyxSdkPassThrough/main.py +82 -0
- build/lib/another_ayx_python_sdk/providers/__init__.py +14 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/__init__.py +41 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/__main__.py +85 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/amp_dcm.py +58 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/amp_driver.py +358 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/amp_environment.py +73 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/amp_environment_v2.py +278 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/amp_input_anchor.py +73 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/amp_input_connection.py +132 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/amp_io.py +64 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/amp_io_components.py +407 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/amp_output_anchor.py +107 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/amp_provider.py +68 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/amp_provider_v2.py +128 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/amp_record_packet.py +21 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/builders/__init__.py +32 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/builders/input_anchor_builder.py +123 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/builders/input_connection_builder.py +95 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/builders/metadata_builder.py +118 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/builders/output_anchor_builder.py +110 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/builders/packers.py +458 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/builders/record_builder.py +204 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/builders/record_packet_builder.py +133 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/builders/tool_config_builder.py +59 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/cng_certs.py +197 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/data_transport/__init__.py +18 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/data_transport/amp_transport.py +127 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/data_transport/transport_base.py +35 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_helpers/__init__.py +14 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_helpers/control_msgs.py +189 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_helpers/dcme_msgs.py +119 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_helpers/record_transfer_msgs.py +32 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_util.py +161 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/logger_config.py +63 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/plugin_class_loader.py +77 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/__init__.py +67 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/dcm_repository.py +252 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/environment_repository.py +212 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/grpc_repository.py +119 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/input_anchor_repository.py +110 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/input_connection_repository.py +276 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/input_metadata_repository.py +144 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/input_record_packet_repository.py +252 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/io_repository.py +188 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/output_anchor_repository.py +117 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/output_metadata_repository.py +129 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/output_record_packet_repository.py +170 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/plugin_class_repository.py +55 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/singleton.py +32 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/test_harness_state_repository.py +172 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/tool_config_repository.py +89 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/__init__.py +14 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/__init__.py +0 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/close_outgoing_anchor_pb2.py +25 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/close_outgoing_anchor_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/dcm_e_pb2.py +38 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/dcm_e_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_anchor_pb2.py +26 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_anchor_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_complete_pb2.py +25 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_complete_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_pb2.py +26 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_data_push_pb2.py +26 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_data_push_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_record_packet_push_pb2.py +26 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_record_packet_push_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/metadata_pb2.py +31 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/metadata_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_anchor_pb2.py +28 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_anchor_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_data_push_pb2.py +26 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_data_push_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_metadata_push_pb2.py +26 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_metadata_push_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_record_packet_push_pb2.py +26 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_record_packet_push_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/output_message_data_pb2.py +29 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/output_message_data_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/password_data_pb2.py +25 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/password_data_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/plugin_initialization_data_pb2.py +33 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/plugin_initialization_data_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/record_batch_pb2.py +25 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/record_batch_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/record_packet_pb2.py +29 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/record_packet_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_engine_service_pb2.py +34 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_engine_service_pb2_grpc.py +305 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_pb2.py +30 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_pb2_grpc.py +235 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_startup_info_pb2.py +25 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_startup_info_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_v2_pb2.py +54 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_v2_pb2_grpc.py +99 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/translate_message_data_pb2.py +27 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/translate_message_data_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/transport_pb2.py +31 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/transport_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/update_progress_pb2.py +25 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/update_progress_pb2_grpc.py +4 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/sdk_tool_runner.py +115 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/sdk_tool_service.py +207 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/sdk_tool_service_v2.py +306 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/utilities/__init__.py +14 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/utilities/constants.py +22 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/utilities/conversions.py +55 -0
- build/lib/another_ayx_python_sdk/providers/amp_provider/utilities/utilities.py +63 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/__init__.py +36 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/anchor_builder.py +95 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/cache_e1_sdk_import.py +31 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/connection_callback_strategy.py +155 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/connection_interface.py +125 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/e1_dcm.py +53 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/e1_environment.py +127 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/e1_input_anchor.py +51 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/e1_input_anchor_proxy.py +33 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/e1_input_connection.py +87 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/e1_io.py +71 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/e1_output_anchor.py +157 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/e1_output_anchor_proxy.py +97 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/e1_plugin_driver.py +63 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/e1_plugin_proxy.py +363 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/e1_provider.py +71 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/e1_record_packet.py +21 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/events.py +36 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/__init__.py +37 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/alteryx_engine.py +105 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/constants.py +50 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/field.py +122 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/output_anchor.py +55 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/output_anchor_manager.py +31 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_copier.py +65 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_creator.py +41 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_info.py +134 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_ref.py +42 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/tool.py +29 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/tool_execution_info.py +43 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/__init__.py +14 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/proxies/__init__.py +18 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/proxies/field_proxy.py +109 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/proxies/record_copier_proxy.py +49 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/records/__init__.py +23 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/records/base_record_container.py +47 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/records/parsed_record_container.py +67 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/records/raw_record_container.py +111 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/tool_config_loader.py +132 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/utilities/__init__.py +35 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/utilities/utilities.py +54 -0
- build/lib/another_ayx_python_sdk/providers/e1_provider/workflow_config.py +31 -0
- build/lib/another_ayx_python_sdk/providers/file_provider/__init__.py +32 -0
- build/lib/another_ayx_python_sdk/providers/file_provider/environment.py +131 -0
- build/lib/another_ayx_python_sdk/providers/file_provider/file_adapter.py +286 -0
- build/lib/another_ayx_python_sdk/providers/file_provider/file_provider.py +185 -0
- build/lib/another_ayx_python_sdk/providers/file_provider/file_provider_dcm.py +53 -0
- build/lib/another_ayx_python_sdk/providers/file_provider/file_provider_input_anchor.py +70 -0
- build/lib/another_ayx_python_sdk/providers/file_provider/file_provider_input_connection.py +112 -0
- build/lib/another_ayx_python_sdk/providers/file_provider/file_provider_output_anchor.py +114 -0
- build/lib/another_ayx_python_sdk/providers/file_provider/file_record_packet.py +21 -0
- build/lib/another_ayx_python_sdk/providers/file_provider/iox.py +56 -0
- build/lib/another_ayx_python_sdk/providers/file_provider/tool_input.py +104 -0
- build/lib/another_ayx_python_sdk/test_harness/__init__.py +14 -0
- build/lib/another_ayx_python_sdk/test_harness/__main__.py +120 -0
- build/lib/another_ayx_python_sdk/test_harness/plugin_runner.py +416 -0
- build/lib/another_ayx_python_sdk/test_harness/process_lifecycle_manager.py +80 -0
- build/lib/another_ayx_python_sdk/test_harness/sdk_engine_service.py +106 -0
- build/lib/another_ayx_python_sdk/version.py +8 -0
- build/lib/build/lib/another_ayx_python_sdk/__init__.py +14 -0
- build/lib/build/lib/another_ayx_python_sdk/__main__.py +470 -0
- build/lib/build/lib/another_ayx_python_sdk/assets/workspace_files/__init__.py +14 -0
- build/lib/build/lib/another_ayx_python_sdk/assets/workspace_files/setup.py +38 -0
- build/lib/build/lib/another_ayx_python_sdk/cli/__init__.py +14 -0
- build/lib/build/lib/another_ayx_python_sdk/cli/utilities.py +103 -0
- build/lib/build/lib/another_ayx_python_sdk/cli/workspace.py +266 -0
- build/lib/build/lib/another_ayx_python_sdk/cli/yxi_builder.py +125 -0
- build/lib/build/lib/another_ayx_python_sdk/cli/yxi_installer.py +45 -0
- build/lib/build/lib/another_ayx_python_sdk/core/__init__.py +51 -0
- build/lib/build/lib/another_ayx_python_sdk/core/constants.py +25 -0
- build/lib/build/lib/another_ayx_python_sdk/core/dcm_base.py +115 -0
- build/lib/build/lib/another_ayx_python_sdk/core/doc_utilities.py +40 -0
- build/lib/build/lib/another_ayx_python_sdk/core/environment_base.py +213 -0
- build/lib/build/lib/another_ayx_python_sdk/core/exceptions.py +59 -0
- build/lib/build/lib/another_ayx_python_sdk/core/field.py +183 -0
- build/lib/build/lib/another_ayx_python_sdk/core/input_anchor_base.py +86 -0
- build/lib/build/lib/another_ayx_python_sdk/core/input_connection_base.py +206 -0
- build/lib/build/lib/another_ayx_python_sdk/core/io_base.py +139 -0
- build/lib/build/lib/another_ayx_python_sdk/core/metadata.py +173 -0
- build/lib/build/lib/another_ayx_python_sdk/core/observable_mixin.py +90 -0
- build/lib/build/lib/another_ayx_python_sdk/core/output_anchor_base.py +151 -0
- build/lib/build/lib/another_ayx_python_sdk/core/plugin.py +108 -0
- build/lib/build/lib/another_ayx_python_sdk/core/plugin_v2.py +97 -0
- build/lib/build/lib/another_ayx_python_sdk/core/provider_base.py +125 -0
- build/lib/build/lib/another_ayx_python_sdk/core/proxy_requests.py +51 -0
- build/lib/build/lib/another_ayx_python_sdk/core/record_packet.py +88 -0
- build/lib/build/lib/another_ayx_python_sdk/core/record_packet_base.py +123 -0
- build/lib/build/lib/another_ayx_python_sdk/core/register_plugin.py +127 -0
- build/lib/build/lib/another_ayx_python_sdk/core/testing.py +191 -0
- build/lib/build/lib/another_ayx_python_sdk/core/utils.py +146 -0
- build/lib/build/lib/another_ayx_python_sdk/examples/AyxSdkInput/main.py +89 -0
- build/lib/build/lib/another_ayx_python_sdk/examples/AyxSdkMultiConnectionsMultiOutputAnchor/main.py +102 -0
- build/lib/build/lib/another_ayx_python_sdk/examples/AyxSdkMultipleInputAnchors/main.py +84 -0
- build/lib/build/lib/another_ayx_python_sdk/examples/AyxSdkMultipleOutputAnchors/main.py +96 -0
- build/lib/build/lib/another_ayx_python_sdk/examples/AyxSdkOptionalInputAnchor/main.py +94 -0
- build/lib/build/lib/another_ayx_python_sdk/examples/AyxSdkOutput/main.py +78 -0
- build/lib/build/lib/another_ayx_python_sdk/examples/AyxSdkPassThrough/main.py +82 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/__init__.py +14 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/__init__.py +41 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/__main__.py +85 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/amp_dcm.py +58 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/amp_driver.py +358 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/amp_environment.py +73 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/amp_environment_v2.py +278 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/amp_input_anchor.py +73 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/amp_input_connection.py +132 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/amp_io.py +64 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/amp_io_components.py +407 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/amp_output_anchor.py +107 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/amp_provider.py +68 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/amp_provider_v2.py +128 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/amp_record_packet.py +21 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/builders/__init__.py +32 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/builders/input_anchor_builder.py +123 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/builders/input_connection_builder.py +95 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/builders/metadata_builder.py +118 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/builders/output_anchor_builder.py +110 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/builders/packers.py +458 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/builders/record_builder.py +204 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/builders/record_packet_builder.py +133 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/builders/tool_config_builder.py +59 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/cng_certs.py +197 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/data_transport/__init__.py +18 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/data_transport/amp_transport.py +127 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/data_transport/transport_base.py +35 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_helpers/__init__.py +14 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_helpers/control_msgs.py +189 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_helpers/dcme_msgs.py +119 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_helpers/record_transfer_msgs.py +32 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_util.py +161 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/logger_config.py +63 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/plugin_class_loader.py +77 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/__init__.py +67 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/dcm_repository.py +252 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/environment_repository.py +212 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/grpc_repository.py +119 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/input_anchor_repository.py +110 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/input_connection_repository.py +276 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/input_metadata_repository.py +144 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/input_record_packet_repository.py +252 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/io_repository.py +188 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/output_anchor_repository.py +117 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/output_metadata_repository.py +129 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/output_record_packet_repository.py +170 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/plugin_class_repository.py +55 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/singleton.py +32 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/test_harness_state_repository.py +172 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/tool_config_repository.py +89 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/__init__.py +14 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/__init__.py +0 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/close_outgoing_anchor_pb2.py +25 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/close_outgoing_anchor_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/dcm_e_pb2.py +38 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/dcm_e_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_anchor_pb2.py +26 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_anchor_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_complete_pb2.py +25 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_complete_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_pb2.py +26 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_data_push_pb2.py +26 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_data_push_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_record_packet_push_pb2.py +26 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_record_packet_push_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/metadata_pb2.py +31 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/metadata_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_anchor_pb2.py +28 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_anchor_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_data_push_pb2.py +26 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_data_push_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_metadata_push_pb2.py +26 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_metadata_push_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_record_packet_push_pb2.py +26 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_record_packet_push_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/output_message_data_pb2.py +29 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/output_message_data_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/password_data_pb2.py +25 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/password_data_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/plugin_initialization_data_pb2.py +33 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/plugin_initialization_data_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/record_batch_pb2.py +25 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/record_batch_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/record_packet_pb2.py +29 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/record_packet_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_engine_service_pb2.py +34 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_engine_service_pb2_grpc.py +305 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_pb2.py +30 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_pb2_grpc.py +235 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_startup_info_pb2.py +25 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_startup_info_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_v2_pb2.py +54 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_v2_pb2_grpc.py +99 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/translate_message_data_pb2.py +27 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/translate_message_data_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/transport_pb2.py +31 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/transport_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/update_progress_pb2.py +25 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/update_progress_pb2_grpc.py +4 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/sdk_tool_runner.py +115 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/sdk_tool_service.py +207 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/sdk_tool_service_v2.py +306 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/utilities/__init__.py +14 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/utilities/constants.py +22 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/utilities/conversions.py +55 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/amp_provider/utilities/utilities.py +63 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/__init__.py +36 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/anchor_builder.py +95 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/cache_e1_sdk_import.py +31 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/connection_callback_strategy.py +155 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/connection_interface.py +125 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/e1_dcm.py +53 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/e1_environment.py +127 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/e1_input_anchor.py +51 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/e1_input_anchor_proxy.py +33 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/e1_input_connection.py +87 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/e1_io.py +71 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/e1_output_anchor.py +157 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/e1_output_anchor_proxy.py +97 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/e1_plugin_driver.py +63 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/e1_plugin_proxy.py +363 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/e1_provider.py +71 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/e1_record_packet.py +21 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/events.py +36 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/__init__.py +37 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/alteryx_engine.py +105 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/constants.py +50 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/field.py +122 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/output_anchor.py +55 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/output_anchor_manager.py +31 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_copier.py +65 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_creator.py +41 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_info.py +134 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_ref.py +42 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/tool.py +29 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/tool_execution_info.py +43 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/__init__.py +14 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/proxies/__init__.py +18 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/proxies/field_proxy.py +109 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/proxies/record_copier_proxy.py +49 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/records/__init__.py +23 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/records/base_record_container.py +47 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/records/parsed_record_container.py +67 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/records/raw_record_container.py +111 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/tool_config_loader.py +132 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/utilities/__init__.py +35 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/utilities/utilities.py +54 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/workflow_config.py +31 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/file_provider/__init__.py +32 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/file_provider/environment.py +131 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/file_provider/file_adapter.py +286 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/file_provider/file_provider.py +185 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/file_provider/file_provider_dcm.py +53 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/file_provider/file_provider_input_anchor.py +70 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/file_provider/file_provider_input_connection.py +112 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/file_provider/file_provider_output_anchor.py +114 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/file_provider/file_record_packet.py +21 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/file_provider/iox.py +56 -0
- build/lib/build/lib/another_ayx_python_sdk/providers/file_provider/tool_input.py +104 -0
- build/lib/build/lib/another_ayx_python_sdk/test_harness/__init__.py +14 -0
- build/lib/build/lib/another_ayx_python_sdk/test_harness/__main__.py +120 -0
- build/lib/build/lib/another_ayx_python_sdk/test_harness/plugin_runner.py +416 -0
- build/lib/build/lib/another_ayx_python_sdk/test_harness/process_lifecycle_manager.py +80 -0
- build/lib/build/lib/another_ayx_python_sdk/test_harness/sdk_engine_service.py +106 -0
- build/lib/build/lib/another_ayx_python_sdk/version.py +8 -0
- another_ayx_python_sdk-2.4.2.dist-info/RECORD +0 -403
- {another_ayx_python_sdk-2.4.2.dist-info → another_ayx_python_sdk-2.4.22.dist-info}/WHEEL +0 -0
- {another_ayx_python_sdk-2.4.2.dist-info → another_ayx_python_sdk-2.4.22.dist-info}/entry_points.txt +0 -0
- {another_ayx_python_sdk-2.4.2.dist-info → another_ayx_python_sdk-2.4.22.dist-info}/licenses/LICENSE +0 -0
build/lib/build/lib/another_ayx_python_sdk/providers/e1_provider/connection_callback_strategy.py
ADDED
@@ -0,0 +1,155 @@
|
|
1
|
+
# Copyright (C) 2022 Alteryx, Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the ALTERYX SDK AND API LICENSE AGREEMENT;
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.alteryx.com/alteryx-sdk-and-api-license-agreement
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
"""Connection callback strategy definitions."""
|
15
|
+
from abc import ABC, abstractmethod
|
16
|
+
from typing import Any, TYPE_CHECKING
|
17
|
+
|
18
|
+
from .connection_interface import ConnectionInterface
|
19
|
+
|
20
|
+
if TYPE_CHECKING:
|
21
|
+
from another_ayx_python_sdk.providers.e1_provider.e1_plugin_proxy import E1PluginProxy
|
22
|
+
|
23
|
+
|
24
|
+
class ConnectionCallbackStrategy(ABC):
|
25
|
+
"""ABC for callback strategy."""
|
26
|
+
|
27
|
+
__slots__ = ["plugin_proxy"]
|
28
|
+
|
29
|
+
def __init__(self, plugin_proxy: "E1PluginProxy") -> None:
|
30
|
+
"""Construct a callback strategy."""
|
31
|
+
self.plugin_proxy = plugin_proxy
|
32
|
+
|
33
|
+
def update_progress_callback(self, **_: Any) -> None:
|
34
|
+
"""Update input progress percentage."""
|
35
|
+
import numpy as np
|
36
|
+
|
37
|
+
percent = float(
|
38
|
+
np.mean(
|
39
|
+
[
|
40
|
+
connection.progress_percentage
|
41
|
+
for anchor in self.plugin_proxy.input_anchors
|
42
|
+
for connection in anchor.connections
|
43
|
+
]
|
44
|
+
)
|
45
|
+
)
|
46
|
+
|
47
|
+
self.plugin_proxy.io.update_progress(percent)
|
48
|
+
|
49
|
+
for anchor in self.plugin_proxy.output_anchors:
|
50
|
+
anchor.update_progress(percent)
|
51
|
+
|
52
|
+
def connection_initialized_callback(
|
53
|
+
self, connection: ConnectionInterface, **_: Any
|
54
|
+
) -> None:
|
55
|
+
"""Run callback for connection initialization."""
|
56
|
+
try:
|
57
|
+
if not self.plugin_proxy.all_required_connections_connected:
|
58
|
+
self.plugin_proxy.raise_missing_inputs()
|
59
|
+
|
60
|
+
if (
|
61
|
+
not self.plugin_proxy.initialized
|
62
|
+
and not self.plugin_proxy.failure_occurred
|
63
|
+
):
|
64
|
+
if self.plugin_proxy.plugin_driver is None:
|
65
|
+
raise ValueError("Record provider must be initialized.")
|
66
|
+
self.plugin_proxy.plugin_driver.initialize_plugin()
|
67
|
+
self.plugin_proxy.initialized = True
|
68
|
+
|
69
|
+
if not self.plugin_proxy.failure_occurred:
|
70
|
+
if self.plugin_proxy.plugin_driver is None:
|
71
|
+
raise ValueError("Record provider must be initialized.")
|
72
|
+
self.plugin_proxy.plugin_driver.initialize_connection(connection)
|
73
|
+
|
74
|
+
except Exception as e:
|
75
|
+
self.plugin_proxy.handle_plugin_error(e)
|
76
|
+
|
77
|
+
@abstractmethod
|
78
|
+
def record_received_callback(
|
79
|
+
self, connection: ConnectionInterface, **_: Any
|
80
|
+
) -> None:
|
81
|
+
"""Run callback for when a record is received."""
|
82
|
+
pass
|
83
|
+
|
84
|
+
@abstractmethod
|
85
|
+
def connection_closed_callback(self, **_: Any) -> None:
|
86
|
+
"""Run callback for connection closing."""
|
87
|
+
pass
|
88
|
+
|
89
|
+
|
90
|
+
class WorkflowRunConnectionCallbackStrategy(ConnectionCallbackStrategy):
|
91
|
+
"""Callback strategy for workflow runs."""
|
92
|
+
|
93
|
+
def record_received_callback(
|
94
|
+
self, connection: ConnectionInterface, **_: Any
|
95
|
+
) -> None:
|
96
|
+
"""Process single records by batch size."""
|
97
|
+
batch_size = connection.record_batch_size
|
98
|
+
|
99
|
+
if batch_size is None:
|
100
|
+
return
|
101
|
+
|
102
|
+
if (
|
103
|
+
len(connection.record_containers[0].records) >= batch_size
|
104
|
+
and not self.plugin_proxy.failure_occurred
|
105
|
+
):
|
106
|
+
try:
|
107
|
+
if self.plugin_proxy.plugin_driver is None:
|
108
|
+
raise ValueError("Record provider must be initialized.")
|
109
|
+
self.plugin_proxy.plugin_driver.on_record_packet(connection)
|
110
|
+
|
111
|
+
except Exception as e:
|
112
|
+
self.plugin_proxy.handle_plugin_error(e)
|
113
|
+
|
114
|
+
def connection_closed_callback(self, **_: Any) -> None:
|
115
|
+
"""Process any remaining records and finalize."""
|
116
|
+
if (
|
117
|
+
self.plugin_proxy.all_connections_closed
|
118
|
+
and not self.plugin_proxy.failure_occurred
|
119
|
+
):
|
120
|
+
try:
|
121
|
+
if self.plugin_proxy.plugin_driver is None:
|
122
|
+
raise ValueError("Record provider must be initialized.")
|
123
|
+
for anchor in self.plugin_proxy.input_anchors:
|
124
|
+
for connection in anchor.connections:
|
125
|
+
if any(
|
126
|
+
len(container.records) > 0
|
127
|
+
for container in connection.record_containers
|
128
|
+
):
|
129
|
+
self.plugin_proxy.plugin_driver.on_record_packet(connection)
|
130
|
+
self.plugin_proxy.plugin_driver.on_complete()
|
131
|
+
self.plugin_proxy.close_output_anchors()
|
132
|
+
|
133
|
+
except Exception as e:
|
134
|
+
self.plugin_proxy.handle_plugin_error(e)
|
135
|
+
|
136
|
+
|
137
|
+
class UpdateOnlyConnectionCallbackStrategy(ConnectionCallbackStrategy):
|
138
|
+
"""Callback strategy for update only runs."""
|
139
|
+
|
140
|
+
def record_received_callback(
|
141
|
+
self, connection: ConnectionInterface, **_: Any
|
142
|
+
) -> None:
|
143
|
+
"""Raise error since this should never be called in update only mode."""
|
144
|
+
raise RuntimeError("Record received in update only mode.")
|
145
|
+
|
146
|
+
def connection_closed_callback(self, **_: Any) -> None:
|
147
|
+
"""Close all anchors."""
|
148
|
+
if (
|
149
|
+
self.plugin_proxy.all_connections_closed
|
150
|
+
and not self.plugin_proxy.failure_occurred
|
151
|
+
):
|
152
|
+
try:
|
153
|
+
self.plugin_proxy.close_output_anchors()
|
154
|
+
except Exception as e:
|
155
|
+
self.plugin_proxy.handle_plugin_error(e)
|
@@ -0,0 +1,125 @@
|
|
1
|
+
# Copyright (C) 2022 Alteryx, Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the ALTERYX SDK AND API LICENSE AGREEMENT;
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.alteryx.com/alteryx-sdk-and-api-license-agreement
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
"""Connection class definitions."""
|
15
|
+
from enum import IntEnum
|
16
|
+
from typing import Any, List, Optional, TYPE_CHECKING
|
17
|
+
|
18
|
+
from another_ayx_python_sdk.providers.e1_provider.mock_e1_sdk.AlteryxPythonSDK import RecordInfo, RecordRef
|
19
|
+
|
20
|
+
from another_ayx_python_sdk.core.observable_mixin import ObservableMixin
|
21
|
+
from another_ayx_python_sdk.providers.e1_provider.events import (
|
22
|
+
ConnectionEvents,
|
23
|
+
PluginEvents,
|
24
|
+
)
|
25
|
+
from another_ayx_python_sdk.providers.e1_provider.records import BaseRecordContainer
|
26
|
+
|
27
|
+
if TYPE_CHECKING:
|
28
|
+
from another_ayx_python_sdk.providers.e1_provider.e1_input_anchor_proxy import (
|
29
|
+
E1InputAnchorProxy,
|
30
|
+
)
|
31
|
+
from another_ayx_python_sdk.providers.e1_provider.e1_plugin_proxy import E1PluginProxy
|
32
|
+
|
33
|
+
|
34
|
+
ConnectionStatus = IntEnum(
|
35
|
+
"ConnectionStatus", "CREATED INITIALIZED RECEIVING_RECORDS CLOSED"
|
36
|
+
)
|
37
|
+
|
38
|
+
|
39
|
+
class ConnectionInterface(ObservableMixin):
|
40
|
+
"""Connection interface definition."""
|
41
|
+
|
42
|
+
__slots__ = [
|
43
|
+
"name",
|
44
|
+
"record_containers",
|
45
|
+
"__record_info",
|
46
|
+
"progress_percentage",
|
47
|
+
"status",
|
48
|
+
"plugin_failed",
|
49
|
+
"anchor",
|
50
|
+
"record_batch_size",
|
51
|
+
"plugin_proxy",
|
52
|
+
]
|
53
|
+
|
54
|
+
def __init__(
|
55
|
+
self,
|
56
|
+
plugin_proxy: "E1PluginProxy",
|
57
|
+
connection_name: str,
|
58
|
+
anchor: "E1InputAnchorProxy",
|
59
|
+
) -> None:
|
60
|
+
"""Instantiate a connection interface."""
|
61
|
+
super().__init__()
|
62
|
+
self.name = connection_name
|
63
|
+
self.__record_info: Optional[RecordInfo] = None
|
64
|
+
self.progress_percentage = 0.0
|
65
|
+
self.status = ConnectionStatus.CREATED
|
66
|
+
self.plugin_failed = False
|
67
|
+
self.record_containers: List[BaseRecordContainer] = []
|
68
|
+
self.anchor = anchor
|
69
|
+
self.record_batch_size: Optional[int] = None
|
70
|
+
self.plugin_proxy = plugin_proxy
|
71
|
+
self.plugin_proxy.subscribe(
|
72
|
+
PluginEvents.PLUGIN_FAILURE, self.plugin_failure_callback
|
73
|
+
)
|
74
|
+
|
75
|
+
@property
|
76
|
+
def record_info(self) -> Optional[RecordInfo]:
|
77
|
+
"""Getter for record info."""
|
78
|
+
return self.__record_info
|
79
|
+
|
80
|
+
def add_record_container(self, container: BaseRecordContainer) -> None:
|
81
|
+
"""Add a new record container."""
|
82
|
+
self.record_containers.append(container)
|
83
|
+
|
84
|
+
def clear_records(self) -> None:
|
85
|
+
"""Clear all records for this connection's containers."""
|
86
|
+
for container in self.record_containers:
|
87
|
+
container.clear_records()
|
88
|
+
|
89
|
+
def plugin_failure_callback(self, **_: Any) -> None:
|
90
|
+
"""Set failed status from plugin."""
|
91
|
+
self.plugin_failed = True
|
92
|
+
|
93
|
+
def ii_init(self, record_info: RecordInfo) -> bool:
|
94
|
+
"""Initialize the connection."""
|
95
|
+
# DO NOT REMOVE NEXT LINE: The base SDK has issues with sys.path updates,
|
96
|
+
# and in order to fix some dependency resolution issues we have to update it again here
|
97
|
+
self.plugin_proxy.update_sys_path()
|
98
|
+
self.status = ConnectionStatus.INITIALIZED
|
99
|
+
self.__record_info = record_info
|
100
|
+
self.notify_topic(ConnectionEvents.CONNECTION_INITIALIZED, connection=self)
|
101
|
+
|
102
|
+
return not self.plugin_failed
|
103
|
+
|
104
|
+
def ii_push_record(self, record: RecordRef) -> bool:
|
105
|
+
"""Receive a record."""
|
106
|
+
self.status = ConnectionStatus.RECEIVING_RECORDS
|
107
|
+
|
108
|
+
for container in self.record_containers:
|
109
|
+
container.add_record(record)
|
110
|
+
|
111
|
+
self.notify_topic(ConnectionEvents.RECORD_RECEIVED, connection=self)
|
112
|
+
|
113
|
+
return not self.plugin_failed
|
114
|
+
|
115
|
+
def ii_update_progress(self, d_percent: float) -> None:
|
116
|
+
"""Update progress of incoming data."""
|
117
|
+
self.progress_percentage = max(d_percent, 0)
|
118
|
+
self.notify_topic(
|
119
|
+
ConnectionEvents.PROGRESS_UPDATE, connection=self, percent=d_percent
|
120
|
+
)
|
121
|
+
|
122
|
+
def ii_close(self) -> None:
|
123
|
+
"""Close the connection."""
|
124
|
+
self.status = ConnectionStatus.CLOSED
|
125
|
+
self.notify_topic(ConnectionEvents.CONNECTION_CLOSED, connection=self)
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# Copyright (C) 2022 Alteryx, Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the ALTERYX SDK AND API LICENSE AGREEMENT;
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.alteryx.com/alteryx-sdk-and-api-license-agreement
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
"""E1 Provider: Proxy class for DCM API."""
|
15
|
+
import datetime as dt
|
16
|
+
from typing import Dict, Optional
|
17
|
+
|
18
|
+
from another_ayx_python_sdk.core import DcmBase
|
19
|
+
from another_ayx_python_sdk.core.doc_utilities import inherit_docs
|
20
|
+
|
21
|
+
|
22
|
+
@inherit_docs
|
23
|
+
class E1ProviderDCM(DcmBase):
|
24
|
+
"""Class that wraps DCM API work."""
|
25
|
+
|
26
|
+
def get_connection(self, connection_id: str) -> Dict: # noqa: D102
|
27
|
+
raise NotImplementedError()
|
28
|
+
|
29
|
+
def get_write_lock(
|
30
|
+
self,
|
31
|
+
connection_id: str,
|
32
|
+
role: str,
|
33
|
+
secret_type: str,
|
34
|
+
expires_in: Optional[dt.datetime],
|
35
|
+
) -> Dict: # noqa: D102
|
36
|
+
raise NotImplementedError()
|
37
|
+
|
38
|
+
def free_write_lock(
|
39
|
+
self, connection_id: str, role: str, secret_type: str, lock_id: str
|
40
|
+
) -> None: # noqa: D102
|
41
|
+
raise NotImplementedError()
|
42
|
+
|
43
|
+
def update_connection_secret(
|
44
|
+
self,
|
45
|
+
connection_id: str,
|
46
|
+
lock_id: str,
|
47
|
+
role: str,
|
48
|
+
secret_type: str,
|
49
|
+
value: str,
|
50
|
+
expires_on: Optional[dt.datetime],
|
51
|
+
parameters: Optional[Dict[str, str]],
|
52
|
+
) -> Dict: # noqa: D102
|
53
|
+
raise NotImplementedError()
|
@@ -0,0 +1,127 @@
|
|
1
|
+
# Copyright (C) 2022 Alteryx, Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the ALTERYX SDK AND API LICENSE AGREEMENT;
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.alteryx.com/alteryx-sdk-and-api-license-agreement
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
"""Proxy Class for managing SDK Environment."""
|
15
|
+
import os
|
16
|
+
from pathlib import Path
|
17
|
+
from typing import TYPE_CHECKING
|
18
|
+
|
19
|
+
import another_ayx_python_sdk.providers.e1_provider.mock_e1_sdk.AlteryxPythonSDK as Sdk
|
20
|
+
|
21
|
+
from another_ayx_python_sdk.core.doc_utilities import inherit_docs
|
22
|
+
from another_ayx_python_sdk.core.environment_base import (
|
23
|
+
EnvironmentBase,
|
24
|
+
Locale,
|
25
|
+
UpdateMode,
|
26
|
+
)
|
27
|
+
|
28
|
+
|
29
|
+
import xmltodict
|
30
|
+
|
31
|
+
|
32
|
+
if TYPE_CHECKING:
|
33
|
+
from another_ayx_python_sdk.providers.e1_provider.e1_plugin_proxy import E1PluginProxy
|
34
|
+
|
35
|
+
|
36
|
+
@inherit_docs
|
37
|
+
class E1Environment(EnvironmentBase):
|
38
|
+
"""Environment variables for Designer."""
|
39
|
+
|
40
|
+
__slots__ = ["_engine", "_tool_id", "_plugin_proxy", "_workflow_id"]
|
41
|
+
|
42
|
+
def __init__(
|
43
|
+
self, engine: Sdk.AlteryxEngine, tool_id: int, plugin_proxy: "E1PluginProxy"
|
44
|
+
) -> None:
|
45
|
+
"""Instantiate the Designer environment information."""
|
46
|
+
self._engine = engine
|
47
|
+
self._tool_id = tool_id
|
48
|
+
self._plugin_proxy = plugin_proxy
|
49
|
+
self._workflow_id = ""
|
50
|
+
|
51
|
+
@property
|
52
|
+
def update_only(self) -> bool: # noqa: D102
|
53
|
+
return bool(self._engine.get_init_var(self._tool_id, "UpdateOnly") == "True")
|
54
|
+
|
55
|
+
@property
|
56
|
+
def update_mode(self) -> UpdateMode: # noqa: D102
|
57
|
+
return UpdateMode(self._engine.get_init_var(self._tool_id, "UpdateMode"))
|
58
|
+
|
59
|
+
@property
|
60
|
+
def designer_version(self) -> str: # noqa: D102
|
61
|
+
return str(self._engine.get_init_var(self._tool_id, "Version"))
|
62
|
+
|
63
|
+
@property
|
64
|
+
def workflow_dir(self) -> Path: # noqa: D102
|
65
|
+
return Path(self._engine.get_init_var(self._tool_id, "DefaultDir"))
|
66
|
+
|
67
|
+
@property
|
68
|
+
def workflow_id(self) -> str: # noqa: D102
|
69
|
+
return str(self._engine.get_init_var(self._tool_id, "WorkflowRunGuid"))
|
70
|
+
|
71
|
+
@property
|
72
|
+
def alteryx_install_dir(self) -> Path: # noqa: D102
|
73
|
+
return (
|
74
|
+
Path(self._engine.get_init_var(self._tool_id, "RuntimeDataPath"))
|
75
|
+
.resolve()
|
76
|
+
.parent.parent
|
77
|
+
)
|
78
|
+
|
79
|
+
@property
|
80
|
+
def alteryx_locale(self) -> Locale: # noqa: D102
|
81
|
+
designer_version = self.designer_version[0:6]
|
82
|
+
user_settings_path = (
|
83
|
+
Path(os.environ["APPDATA"])
|
84
|
+
/ "Alteryx"
|
85
|
+
/ "Engine"
|
86
|
+
/ designer_version
|
87
|
+
/ "UserSettings.xml"
|
88
|
+
)
|
89
|
+
|
90
|
+
with open(user_settings_path) as f:
|
91
|
+
user_settings = xmltodict.parse(f.read())
|
92
|
+
locale: Locale = user_settings["AlteryxSettings"]["GloablSettings"][
|
93
|
+
"HelpLanguage"
|
94
|
+
]["#text"]
|
95
|
+
return locale
|
96
|
+
|
97
|
+
def get_settings_conf(
|
98
|
+
self, keys: list, version_override: str = ""
|
99
|
+
) -> dict: # noqa: D102
|
100
|
+
"""Parse xml to retrieve settings."""
|
101
|
+
return super().get_settings_conf(keys, version_override)
|
102
|
+
|
103
|
+
def parse_settings_key_value(
|
104
|
+
self, settings_str: str, line_delimiter: str = "\n", key_delimiter: str = "="
|
105
|
+
) -> dict: # noqa: D102
|
106
|
+
return super().parse_settings_key_value(
|
107
|
+
settings_str, line_delimiter=line_delimiter, key_delimiter=key_delimiter
|
108
|
+
)
|
109
|
+
|
110
|
+
@property
|
111
|
+
def proxy_configuration(self) -> dict: # noqa: D102
|
112
|
+
"""Retrieve proxy config from UserSettings.xml."""
|
113
|
+
keys = ["AlteryxSettings", "GloablSettings", "ProxyConfiguration"]
|
114
|
+
conf = self.get_settings_conf(keys).get("#text", "")
|
115
|
+
return self.parse_settings_key_value(conf)
|
116
|
+
|
117
|
+
@property
|
118
|
+
def tool_id(self) -> int: # noqa: D102
|
119
|
+
return self._tool_id
|
120
|
+
|
121
|
+
def update_tool_config(self, new_config: dict) -> None: # noqa: D102
|
122
|
+
if self._plugin_proxy.workflow_config.original_data != new_config:
|
123
|
+
self._engine.output_message(
|
124
|
+
self._tool_id,
|
125
|
+
Sdk.Status.update_output_config_xml,
|
126
|
+
xmltodict.unparse({"Configuration": new_config}),
|
127
|
+
)
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# Copyright (C) 2022 Alteryx, Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the ALTERYX SDK AND API LICENSE AGREEMENT;
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.alteryx.com/alteryx-sdk-and-api-license-agreement
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
"""Alteryx plugin input anchor definition."""
|
15
|
+
from typing import List
|
16
|
+
|
17
|
+
from another_ayx_python_sdk.core.doc_utilities import inherit_docs
|
18
|
+
from another_ayx_python_sdk.core.input_anchor_base import InputAnchorBase
|
19
|
+
from another_ayx_python_sdk.core.input_connection_base import InputConnectionBase
|
20
|
+
from another_ayx_python_sdk.providers.e1_provider.e1_input_anchor_proxy import (
|
21
|
+
E1InputAnchorProxy,
|
22
|
+
)
|
23
|
+
from another_ayx_python_sdk.providers.e1_provider.e1_input_connection import E1InputConnection
|
24
|
+
|
25
|
+
|
26
|
+
@inherit_docs
|
27
|
+
class E1InputAnchor(InputAnchorBase):
|
28
|
+
"""Input anchor to the tool."""
|
29
|
+
|
30
|
+
def __init__(self, input_anchor_proxy: E1InputAnchorProxy) -> None:
|
31
|
+
"""Instantiate an input anchor."""
|
32
|
+
self._input_anchor_proxy = input_anchor_proxy
|
33
|
+
|
34
|
+
@property
|
35
|
+
def name(self) -> str: # noqa: D102
|
36
|
+
return self._input_anchor_proxy.name
|
37
|
+
|
38
|
+
@property
|
39
|
+
def allow_multiple(self) -> bool: # noqa: D102
|
40
|
+
return self._input_anchor_proxy.allow_multiple
|
41
|
+
|
42
|
+
@property
|
43
|
+
def optional(self) -> bool: # noqa: D102
|
44
|
+
return self._input_anchor_proxy.optional
|
45
|
+
|
46
|
+
@property
|
47
|
+
def connections(self) -> List[InputConnectionBase]: # noqa: D102
|
48
|
+
return [
|
49
|
+
E1InputConnection(connection)
|
50
|
+
for connection in self._input_anchor_proxy.connections
|
51
|
+
]
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Copyright (C) 2022 Alteryx, Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the ALTERYX SDK AND API LICENSE AGREEMENT;
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.alteryx.com/alteryx-sdk-and-api-license-agreement
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
"""Alteryx plugin input anchor definition."""
|
15
|
+
from typing import List, TYPE_CHECKING
|
16
|
+
|
17
|
+
if TYPE_CHECKING:
|
18
|
+
from another_ayx_python_sdk.providers.e1_provider.connection_interface import (
|
19
|
+
ConnectionInterface,
|
20
|
+
)
|
21
|
+
|
22
|
+
|
23
|
+
class E1InputAnchorProxy:
|
24
|
+
"""Input anchor to the tool."""
|
25
|
+
|
26
|
+
__slots__ = ["name", "allow_multiple", "optional", "connections"]
|
27
|
+
|
28
|
+
def __init__(self, name: str, allow_multiple: bool, optional: bool):
|
29
|
+
"""Instantiate an input anchor."""
|
30
|
+
self.name = name
|
31
|
+
self.allow_multiple = allow_multiple
|
32
|
+
self.optional = optional
|
33
|
+
self.connections: List[ConnectionInterface] = []
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# Copyright (C) 2022 Alteryx, Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the ALTERYX SDK AND API LICENSE AGREEMENT;
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.alteryx.com/alteryx-sdk-and-api-license-agreement
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
"""E1 SDK Input Connection class."""
|
15
|
+
from typing import Optional, TYPE_CHECKING
|
16
|
+
|
17
|
+
from another_ayx_python_sdk.core.doc_utilities import inherit_docs
|
18
|
+
from another_ayx_python_sdk.core.input_connection_base import InputConnectionBase
|
19
|
+
from another_ayx_python_sdk.providers.e1_provider.connection_interface import (
|
20
|
+
ConnectionInterface,
|
21
|
+
)
|
22
|
+
from another_ayx_python_sdk.providers.e1_provider.e1_record_packet import E1RecordPacket
|
23
|
+
from another_ayx_python_sdk.providers.e1_provider.utilities import (
|
24
|
+
convert_record_info_to_metadata,
|
25
|
+
)
|
26
|
+
|
27
|
+
if TYPE_CHECKING:
|
28
|
+
from another_ayx_python_sdk.core.metadata import Metadata # noqa: F401
|
29
|
+
from another_ayx_python_sdk.core.record_packet import RecordPacket
|
30
|
+
from another_ayx_python_sdk.providers.e1_provider.e1_input_anchor import E1InputAnchor
|
31
|
+
|
32
|
+
|
33
|
+
@inherit_docs
|
34
|
+
class E1InputConnection(InputConnectionBase):
|
35
|
+
"""Class for managing Inputs in E1 SDK."""
|
36
|
+
|
37
|
+
def __init__(self, conn_interface: "ConnectionInterface") -> None:
|
38
|
+
"""Instantiate the input connection."""
|
39
|
+
self._conn_interface = conn_interface
|
40
|
+
|
41
|
+
@property
|
42
|
+
def name(self) -> str: # noqa: D102
|
43
|
+
return self._conn_interface.name
|
44
|
+
|
45
|
+
@property
|
46
|
+
def metadata(self) -> Optional["Metadata"]: # noqa: D102
|
47
|
+
if self._conn_interface.record_info is None:
|
48
|
+
return None
|
49
|
+
|
50
|
+
return convert_record_info_to_metadata(self._conn_interface.record_info)
|
51
|
+
|
52
|
+
@property
|
53
|
+
def anchor(self) -> "E1InputAnchor": # noqa: D102
|
54
|
+
from another_ayx_python_sdk.providers.e1_provider import E1InputAnchor
|
55
|
+
|
56
|
+
return E1InputAnchor(self._conn_interface.anchor)
|
57
|
+
|
58
|
+
def read(self) -> "RecordPacket": # noqa: D102
|
59
|
+
if self.metadata is None:
|
60
|
+
raise RuntimeError("Input connection has not been opened yet.")
|
61
|
+
|
62
|
+
record_dataframe = self._conn_interface.record_containers[0].build_dataframe()
|
63
|
+
|
64
|
+
packet = E1RecordPacket.from_dataframe(self.metadata, record_dataframe)
|
65
|
+
self._conn_interface.clear_records()
|
66
|
+
return packet
|
67
|
+
|
68
|
+
def _get_max_packet_size(self) -> Optional[int]:
|
69
|
+
return self._conn_interface.record_batch_size
|
70
|
+
|
71
|
+
def _set_max_packet_size(self, value: Optional[int]) -> None:
|
72
|
+
if value and value <= 0:
|
73
|
+
raise ValueError(
|
74
|
+
"max_packet_size must be None or an integer greater than 0."
|
75
|
+
)
|
76
|
+
|
77
|
+
self._conn_interface.record_batch_size = value
|
78
|
+
|
79
|
+
@property
|
80
|
+
def progress(self) -> float: # noqa: D102
|
81
|
+
return self._conn_interface.progress_percentage
|
82
|
+
|
83
|
+
@progress.setter
|
84
|
+
def progress(self, value: float) -> None: # noqa: D102
|
85
|
+
if value < 0:
|
86
|
+
raise ValueError("Progress percentage must be greater than 0.")
|
87
|
+
self._conn_interface.progress_percentage = value
|