another-ayx-python-sdk 2.4.2__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/__init__.py +14 -0
- another_ayx_python_sdk/__main__.py +470 -0
- another_ayx_python_sdk/assets/workspace_files/__init__.py +14 -0
- another_ayx_python_sdk/assets/workspace_files/setup.py +38 -0
- another_ayx_python_sdk/cli/__init__.py +14 -0
- another_ayx_python_sdk/cli/utilities.py +103 -0
- another_ayx_python_sdk/cli/workspace.py +266 -0
- another_ayx_python_sdk/cli/yxi_builder.py +125 -0
- another_ayx_python_sdk/cli/yxi_installer.py +45 -0
- another_ayx_python_sdk/core/__init__.py +51 -0
- another_ayx_python_sdk/core/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/core/__pycache__/constants.cpython-310.pyc +0 -0
- another_ayx_python_sdk/core/__pycache__/dcm_base.cpython-310.pyc +0 -0
- another_ayx_python_sdk/core/__pycache__/doc_utilities.cpython-310.pyc +0 -0
- another_ayx_python_sdk/core/__pycache__/environment_base.cpython-310.pyc +0 -0
- another_ayx_python_sdk/core/__pycache__/field.cpython-310.pyc +0 -0
- another_ayx_python_sdk/core/__pycache__/input_anchor_base.cpython-310.pyc +0 -0
- another_ayx_python_sdk/core/__pycache__/input_connection_base.cpython-310.pyc +0 -0
- another_ayx_python_sdk/core/__pycache__/io_base.cpython-310.pyc +0 -0
- another_ayx_python_sdk/core/__pycache__/metadata.cpython-310.pyc +0 -0
- another_ayx_python_sdk/core/__pycache__/output_anchor_base.cpython-310.pyc +0 -0
- another_ayx_python_sdk/core/__pycache__/plugin.cpython-310.pyc +0 -0
- another_ayx_python_sdk/core/__pycache__/plugin_v2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/core/__pycache__/provider_base.cpython-310.pyc +0 -0
- another_ayx_python_sdk/core/__pycache__/record_packet.cpython-310.pyc +0 -0
- another_ayx_python_sdk/core/__pycache__/record_packet_base.cpython-310.pyc +0 -0
- another_ayx_python_sdk/core/__pycache__/register_plugin.cpython-310.pyc +0 -0
- another_ayx_python_sdk/core/constants.py +25 -0
- another_ayx_python_sdk/core/dcm_base.py +115 -0
- another_ayx_python_sdk/core/doc_utilities.py +40 -0
- another_ayx_python_sdk/core/environment_base.py +213 -0
- another_ayx_python_sdk/core/exceptions.py +59 -0
- another_ayx_python_sdk/core/field.py +183 -0
- another_ayx_python_sdk/core/input_anchor_base.py +86 -0
- another_ayx_python_sdk/core/input_connection_base.py +206 -0
- another_ayx_python_sdk/core/io_base.py +139 -0
- another_ayx_python_sdk/core/metadata.py +173 -0
- another_ayx_python_sdk/core/observable_mixin.py +90 -0
- another_ayx_python_sdk/core/output_anchor_base.py +151 -0
- another_ayx_python_sdk/core/plugin.py +108 -0
- another_ayx_python_sdk/core/plugin_v2.py +97 -0
- another_ayx_python_sdk/core/provider_base.py +125 -0
- another_ayx_python_sdk/core/proxy_requests.py +51 -0
- another_ayx_python_sdk/core/record_packet.py +88 -0
- another_ayx_python_sdk/core/record_packet_base.py +123 -0
- another_ayx_python_sdk/core/register_plugin.py +127 -0
- another_ayx_python_sdk/core/testing.py +191 -0
- another_ayx_python_sdk/core/utils.py +146 -0
- another_ayx_python_sdk/examples/AyxSdkInput/main.py +89 -0
- another_ayx_python_sdk/examples/AyxSdkMultiConnectionsMultiOutputAnchor/__pycache__/main.cpython-310.pyc +0 -0
- another_ayx_python_sdk/examples/AyxSdkMultiConnectionsMultiOutputAnchor/main.py +102 -0
- another_ayx_python_sdk/examples/AyxSdkMultipleInputAnchors/AyxSdkMultipleInputAnchorsConfig.xml +24 -0
- another_ayx_python_sdk/examples/AyxSdkMultipleInputAnchors/__pycache__/main.cpython-310.pyc +0 -0
- another_ayx_python_sdk/examples/AyxSdkMultipleInputAnchors/main.py +84 -0
- another_ayx_python_sdk/examples/AyxSdkMultipleOutputAnchors/__pycache__/main.cpython-310.pyc +0 -0
- another_ayx_python_sdk/examples/AyxSdkMultipleOutputAnchors/main.py +96 -0
- another_ayx_python_sdk/examples/AyxSdkOptionalInputAnchor/__pycache__/main.cpython-310.pyc +0 -0
- another_ayx_python_sdk/examples/AyxSdkOptionalInputAnchor/main.py +94 -0
- another_ayx_python_sdk/examples/AyxSdkOutput/__pycache__/main.cpython-310.pyc +0 -0
- another_ayx_python_sdk/examples/AyxSdkOutput/main.py +78 -0
- another_ayx_python_sdk/examples/AyxSdkPassThrough/AyxSdkPassThrough.xml +23 -0
- another_ayx_python_sdk/examples/AyxSdkPassThrough/__pycache__/main.cpython-310.pyc +0 -0
- another_ayx_python_sdk/examples/AyxSdkPassThrough/main.py +82 -0
- another_ayx_python_sdk/examples/requirements.txt +18 -0
- another_ayx_python_sdk/providers/__init__.py +14 -0
- another_ayx_python_sdk/providers/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__init__.py +41 -0
- another_ayx_python_sdk/providers/amp_provider/__main__.py +85 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/__main__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/amp_dcm.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/amp_driver.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/amp_environment.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/amp_environment_v2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/amp_input_anchor.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/amp_input_connection.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/amp_io.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/amp_io_components.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/amp_output_anchor.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/amp_provider.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/amp_provider_v2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/amp_record_packet.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/cng_certs.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/grpc_util.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/logger_config.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/plugin_class_loader.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/sdk_tool_runner.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/sdk_tool_service.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/__pycache__/sdk_tool_service_v2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/amp_dcm.py +58 -0
- another_ayx_python_sdk/providers/amp_provider/amp_driver.py +358 -0
- another_ayx_python_sdk/providers/amp_provider/amp_environment.py +73 -0
- another_ayx_python_sdk/providers/amp_provider/amp_environment_v2.py +278 -0
- another_ayx_python_sdk/providers/amp_provider/amp_input_anchor.py +73 -0
- another_ayx_python_sdk/providers/amp_provider/amp_input_connection.py +132 -0
- another_ayx_python_sdk/providers/amp_provider/amp_io.py +64 -0
- another_ayx_python_sdk/providers/amp_provider/amp_io_components.py +407 -0
- another_ayx_python_sdk/providers/amp_provider/amp_output_anchor.py +107 -0
- another_ayx_python_sdk/providers/amp_provider/amp_provider.py +68 -0
- another_ayx_python_sdk/providers/amp_provider/amp_provider_v2.py +128 -0
- another_ayx_python_sdk/providers/amp_provider/amp_record_packet.py +21 -0
- another_ayx_python_sdk/providers/amp_provider/builders/__init__.py +32 -0
- another_ayx_python_sdk/providers/amp_provider/builders/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/builders/__pycache__/input_anchor_builder.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/builders/__pycache__/input_connection_builder.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/builders/__pycache__/metadata_builder.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/builders/__pycache__/output_anchor_builder.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/builders/__pycache__/packers.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/builders/__pycache__/record_builder.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/builders/__pycache__/record_packet_builder.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/builders/__pycache__/tool_config_builder.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/builders/input_anchor_builder.py +123 -0
- another_ayx_python_sdk/providers/amp_provider/builders/input_connection_builder.py +95 -0
- another_ayx_python_sdk/providers/amp_provider/builders/metadata_builder.py +118 -0
- another_ayx_python_sdk/providers/amp_provider/builders/output_anchor_builder.py +110 -0
- another_ayx_python_sdk/providers/amp_provider/builders/packers.py +458 -0
- another_ayx_python_sdk/providers/amp_provider/builders/record_builder.py +204 -0
- another_ayx_python_sdk/providers/amp_provider/builders/record_packet_builder.py +133 -0
- another_ayx_python_sdk/providers/amp_provider/builders/tool_config_builder.py +59 -0
- another_ayx_python_sdk/providers/amp_provider/cng_certs.py +197 -0
- another_ayx_python_sdk/providers/amp_provider/data_transport/__init__.py +18 -0
- another_ayx_python_sdk/providers/amp_provider/data_transport/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/data_transport/__pycache__/amp_transport.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/data_transport/__pycache__/transport_base.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/data_transport/amp_transport.py +127 -0
- another_ayx_python_sdk/providers/amp_provider/data_transport/transport_base.py +35 -0
- another_ayx_python_sdk/providers/amp_provider/grpc_helpers/__init__.py +14 -0
- another_ayx_python_sdk/providers/amp_provider/grpc_helpers/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/grpc_helpers/__pycache__/control_msgs.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/grpc_helpers/__pycache__/dcme_msgs.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/grpc_helpers/__pycache__/record_transfer_msgs.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/grpc_helpers/control_msgs.py +189 -0
- another_ayx_python_sdk/providers/amp_provider/grpc_helpers/dcme_msgs.py +119 -0
- another_ayx_python_sdk/providers/amp_provider/grpc_helpers/record_transfer_msgs.py +32 -0
- another_ayx_python_sdk/providers/amp_provider/grpc_util.py +161 -0
- another_ayx_python_sdk/providers/amp_provider/logger_config.py +63 -0
- another_ayx_python_sdk/providers/amp_provider/plugin_class_loader.py +77 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/__init__.py +67 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/__pycache__/dcm_repository.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/__pycache__/environment_repository.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/__pycache__/grpc_repository.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/__pycache__/input_anchor_repository.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/__pycache__/input_connection_repository.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/__pycache__/input_metadata_repository.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/__pycache__/input_record_packet_repository.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/__pycache__/io_repository.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/__pycache__/output_anchor_repository.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/__pycache__/output_metadata_repository.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/__pycache__/output_record_packet_repository.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/__pycache__/plugin_class_repository.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/__pycache__/singleton.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/__pycache__/test_harness_state_repository.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/__pycache__/tool_config_repository.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/dcm_repository.py +252 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/environment_repository.py +212 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/grpc_repository.py +119 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/input_anchor_repository.py +110 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/input_connection_repository.py +276 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/input_metadata_repository.py +144 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/input_record_packet_repository.py +252 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/io_repository.py +188 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/output_anchor_repository.py +117 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/output_metadata_repository.py +129 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/output_record_packet_repository.py +170 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/plugin_class_repository.py +55 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/singleton.py +32 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/test_harness_state_repository.py +172 -0
- another_ayx_python_sdk/providers/amp_provider/repositories/tool_config_repository.py +89 -0
- another_ayx_python_sdk/providers/amp_provider/resources/__init__.py +14 -0
- another_ayx_python_sdk/providers/amp_provider/resources/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__init__.py +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/close_outgoing_anchor_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/close_outgoing_anchor_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/dcm_e_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/dcm_e_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/incoming_anchor_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/incoming_anchor_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/incoming_connection_complete_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/incoming_connection_complete_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/incoming_connection_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/incoming_connection_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/incoming_data_push_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/incoming_data_push_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/incoming_record_packet_push_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/incoming_record_packet_push_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/metadata_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/metadata_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/outgoing_anchor_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/outgoing_anchor_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/outgoing_data_push_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/outgoing_data_push_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/outgoing_metadata_push_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/outgoing_metadata_push_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/outgoing_record_packet_push_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/outgoing_record_packet_push_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/output_message_data_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/output_message_data_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/password_data_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/password_data_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/plugin_initialization_data_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/plugin_initialization_data_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/record_batch_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/record_batch_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/record_packet_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/record_packet_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/sdk_engine_service_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/sdk_engine_service_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/sdk_tool_service_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/sdk_tool_service_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/sdk_tool_service_startup_info_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/sdk_tool_service_startup_info_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/sdk_tool_service_v2_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/sdk_tool_service_v2_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/translate_message_data_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/translate_message_data_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/transport_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/transport_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/update_progress_pb2.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/__pycache__/update_progress_pb2_grpc.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/close_outgoing_anchor_pb2.py +25 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/close_outgoing_anchor_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/dcm_e_pb2.py +38 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/dcm_e_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_anchor_pb2.py +26 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_anchor_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_complete_pb2.py +25 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_complete_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_pb2.py +26 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_data_push_pb2.py +26 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_data_push_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_record_packet_push_pb2.py +26 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_record_packet_push_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/metadata_pb2.py +31 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/metadata_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_anchor_pb2.py +28 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_anchor_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_data_push_pb2.py +26 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_data_push_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_metadata_push_pb2.py +26 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_metadata_push_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_record_packet_push_pb2.py +26 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_record_packet_push_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/output_message_data_pb2.py +29 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/output_message_data_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/password_data_pb2.py +25 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/password_data_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/plugin_initialization_data_pb2.py +33 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/plugin_initialization_data_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/record_batch_pb2.py +25 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/record_batch_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/record_packet_pb2.py +29 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/record_packet_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_engine_service_pb2.py +34 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_engine_service_pb2_grpc.py +305 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_pb2.py +30 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_pb2_grpc.py +235 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_startup_info_pb2.py +25 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_startup_info_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_v2_pb2.py +54 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_v2_pb2_grpc.py +99 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/translate_message_data_pb2.py +27 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/translate_message_data_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/transport_pb2.py +31 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/transport_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/update_progress_pb2.py +25 -0
- another_ayx_python_sdk/providers/amp_provider/resources/generated/update_progress_pb2_grpc.py +4 -0
- another_ayx_python_sdk/providers/amp_provider/sdk_tool_runner.py +115 -0
- another_ayx_python_sdk/providers/amp_provider/sdk_tool_service.py +207 -0
- another_ayx_python_sdk/providers/amp_provider/sdk_tool_service_v2.py +306 -0
- another_ayx_python_sdk/providers/amp_provider/utilities/__init__.py +14 -0
- another_ayx_python_sdk/providers/amp_provider/utilities/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/utilities/__pycache__/constants.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/utilities/__pycache__/conversions.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/utilities/__pycache__/utilities.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/amp_provider/utilities/constants.py +22 -0
- another_ayx_python_sdk/providers/amp_provider/utilities/conversions.py +55 -0
- another_ayx_python_sdk/providers/amp_provider/utilities/utilities.py +63 -0
- another_ayx_python_sdk/providers/e1_provider/__init__.py +36 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/anchor_builder.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/cache_e1_sdk_import.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/connection_callback_strategy.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/connection_interface.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/e1_dcm.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/e1_environment.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/e1_input_anchor.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/e1_input_anchor_proxy.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/e1_input_connection.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/e1_io.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/e1_output_anchor.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/e1_output_anchor_proxy.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/e1_plugin_driver.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/e1_plugin_proxy.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/e1_provider.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/e1_record_packet.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/events.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/tool_config_loader.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/__pycache__/workflow_config.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/anchor_builder.py +95 -0
- another_ayx_python_sdk/providers/e1_provider/cache_e1_sdk_import.py +31 -0
- another_ayx_python_sdk/providers/e1_provider/connection_callback_strategy.py +155 -0
- another_ayx_python_sdk/providers/e1_provider/connection_interface.py +125 -0
- another_ayx_python_sdk/providers/e1_provider/e1_dcm.py +53 -0
- another_ayx_python_sdk/providers/e1_provider/e1_environment.py +127 -0
- another_ayx_python_sdk/providers/e1_provider/e1_input_anchor.py +51 -0
- another_ayx_python_sdk/providers/e1_provider/e1_input_anchor_proxy.py +33 -0
- another_ayx_python_sdk/providers/e1_provider/e1_input_connection.py +87 -0
- another_ayx_python_sdk/providers/e1_provider/e1_io.py +71 -0
- another_ayx_python_sdk/providers/e1_provider/e1_output_anchor.py +157 -0
- another_ayx_python_sdk/providers/e1_provider/e1_output_anchor_proxy.py +97 -0
- another_ayx_python_sdk/providers/e1_provider/e1_plugin_driver.py +63 -0
- another_ayx_python_sdk/providers/e1_provider/e1_plugin_proxy.py +363 -0
- another_ayx_python_sdk/providers/e1_provider/e1_provider.py +71 -0
- another_ayx_python_sdk/providers/e1_provider/e1_record_packet.py +21 -0
- another_ayx_python_sdk/providers/e1_provider/events.py +36 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/__init__.py +37 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/__pycache__/alteryx_engine.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/__pycache__/constants.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/__pycache__/field.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/__pycache__/output_anchor.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/__pycache__/output_anchor_manager.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/__pycache__/record_copier.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/__pycache__/record_creator.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/__pycache__/record_info.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/__pycache__/record_ref.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/__pycache__/tool.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/__pycache__/tool_execution_info.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/alteryx_engine.py +105 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/constants.py +50 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/field.py +122 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/output_anchor.py +55 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/output_anchor_manager.py +31 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_copier.py +65 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_creator.py +41 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_info.py +134 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_ref.py +42 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/tool.py +29 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/tool_execution_info.py +43 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/__init__.py +14 -0
- another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/proxies/__init__.py +18 -0
- another_ayx_python_sdk/providers/e1_provider/proxies/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/proxies/__pycache__/field_proxy.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/proxies/__pycache__/record_copier_proxy.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/proxies/field_proxy.py +109 -0
- another_ayx_python_sdk/providers/e1_provider/proxies/record_copier_proxy.py +49 -0
- another_ayx_python_sdk/providers/e1_provider/records/__init__.py +23 -0
- another_ayx_python_sdk/providers/e1_provider/records/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/records/__pycache__/base_record_container.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/records/__pycache__/parsed_record_container.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/records/__pycache__/raw_record_container.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/records/base_record_container.py +47 -0
- another_ayx_python_sdk/providers/e1_provider/records/parsed_record_container.py +67 -0
- another_ayx_python_sdk/providers/e1_provider/records/raw_record_container.py +111 -0
- another_ayx_python_sdk/providers/e1_provider/tool_config_loader.py +132 -0
- another_ayx_python_sdk/providers/e1_provider/utilities/__init__.py +35 -0
- another_ayx_python_sdk/providers/e1_provider/utilities/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/utilities/__pycache__/utilities.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/e1_provider/utilities/utilities.py +54 -0
- another_ayx_python_sdk/providers/e1_provider/workflow_config.py +31 -0
- another_ayx_python_sdk/providers/file_provider/__init__.py +32 -0
- another_ayx_python_sdk/providers/file_provider/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/file_provider/__pycache__/environment.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/file_provider/__pycache__/file_adapter.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/file_provider/__pycache__/file_provider.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/file_provider/__pycache__/file_provider_dcm.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/file_provider/__pycache__/file_provider_input_anchor.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/file_provider/__pycache__/file_provider_input_connection.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/file_provider/__pycache__/file_provider_output_anchor.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/file_provider/__pycache__/file_record_packet.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/file_provider/__pycache__/iox.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/file_provider/__pycache__/tool_input.cpython-310.pyc +0 -0
- another_ayx_python_sdk/providers/file_provider/environment.py +131 -0
- another_ayx_python_sdk/providers/file_provider/file_adapter.py +286 -0
- another_ayx_python_sdk/providers/file_provider/file_provider.py +185 -0
- another_ayx_python_sdk/providers/file_provider/file_provider_dcm.py +53 -0
- another_ayx_python_sdk/providers/file_provider/file_provider_input_anchor.py +70 -0
- another_ayx_python_sdk/providers/file_provider/file_provider_input_connection.py +112 -0
- another_ayx_python_sdk/providers/file_provider/file_provider_output_anchor.py +114 -0
- another_ayx_python_sdk/providers/file_provider/file_record_packet.py +21 -0
- another_ayx_python_sdk/providers/file_provider/iox.py +56 -0
- another_ayx_python_sdk/providers/file_provider/tool_input.py +104 -0
- another_ayx_python_sdk/test_harness/__init__.py +14 -0
- another_ayx_python_sdk/test_harness/__main__.py +120 -0
- another_ayx_python_sdk/test_harness/__pycache__/__init__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/test_harness/__pycache__/__main__.cpython-310.pyc +0 -0
- another_ayx_python_sdk/test_harness/__pycache__/plugin_runner.cpython-310.pyc +0 -0
- another_ayx_python_sdk/test_harness/__pycache__/process_lifecycle_manager.cpython-310.pyc +0 -0
- another_ayx_python_sdk/test_harness/__pycache__/sdk_engine_service.cpython-310.pyc +0 -0
- another_ayx_python_sdk/test_harness/plugin_runner.py +416 -0
- another_ayx_python_sdk/test_harness/process_lifecycle_manager.py +80 -0
- another_ayx_python_sdk/test_harness/sdk_engine_service.py +106 -0
- another_ayx_python_sdk/version.py +8 -0
- another_ayx_python_sdk-2.4.2.dist-info/METADATA +63 -0
- another_ayx_python_sdk-2.4.2.dist-info/RECORD +403 -0
- another_ayx_python_sdk-2.4.2.dist-info/WHEEL +5 -0
- another_ayx_python_sdk-2.4.2.dist-info/entry_points.txt +2 -0
- another_ayx_python_sdk-2.4.2.dist-info/licenses/LICENSE +21 -0
- another_ayx_python_sdk-2.4.2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,102 @@
|
|
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
|
+
"""Example multiple input connection anchor tool."""
|
15
|
+
from typing import Dict, TYPE_CHECKING
|
16
|
+
|
17
|
+
from another_ayx_python_sdk.core import PluginV2
|
18
|
+
|
19
|
+
|
20
|
+
if TYPE_CHECKING:
|
21
|
+
import pyarrow as pa
|
22
|
+
from another_ayx_python_sdk.providers.amp_provider.amp_provider_v2 import AMPProviderV2
|
23
|
+
from another_ayx_python_sdk.core.constants import Anchor
|
24
|
+
|
25
|
+
|
26
|
+
class AyxSdkMultiConnectionsMultiOutputAnchor(PluginV2):
|
27
|
+
"""Concrete implementation of an AyxPlugin."""
|
28
|
+
|
29
|
+
def __init__(self, provider: "AMPProviderV2") -> None:
|
30
|
+
"""Construct a plugin."""
|
31
|
+
self.provider = provider
|
32
|
+
self.provider.io.info("Plugin initialized.")
|
33
|
+
try:
|
34
|
+
self.conn_to_output = self.get_conn_map()
|
35
|
+
except Exception as e:
|
36
|
+
self.provider.io.error(f"Failed to set conn map {repr(e)}")
|
37
|
+
|
38
|
+
def get_conn_map(self) -> Dict[str, str]:
|
39
|
+
"""Map the connections of Input anchor to Output anchors."""
|
40
|
+
connections = self.provider.incoming_anchors["Input"].keys()
|
41
|
+
conn_to_output = {}
|
42
|
+
for name in connections:
|
43
|
+
conn_num = int(name.strip("#"))
|
44
|
+
if conn_num >= 5:
|
45
|
+
# Add any additional input to the last existing anchor.
|
46
|
+
conn_to_output[name] = f"Output5"
|
47
|
+
else:
|
48
|
+
conn_to_output[name] = f"Output{conn_num}"
|
49
|
+
return conn_to_output
|
50
|
+
|
51
|
+
def on_incoming_connection_complete(self, anchor: "Anchor") -> None:
|
52
|
+
"""
|
53
|
+
Call when an incoming connection is done sending data including when no data is sent on an optional input anchor.
|
54
|
+
|
55
|
+
This method IS NOT called during update-only mode.
|
56
|
+
|
57
|
+
Parameters
|
58
|
+
----------
|
59
|
+
anchor
|
60
|
+
NamedTuple containing anchor.name and anchor.connection.
|
61
|
+
"""
|
62
|
+
self.provider.io.info(
|
63
|
+
f"Received complete update from {anchor.name}:{anchor.connection}."
|
64
|
+
)
|
65
|
+
|
66
|
+
def on_record_batch(self, table: "pa.Table", anchor: "Anchor") -> None:
|
67
|
+
"""
|
68
|
+
Process the passed record batch.
|
69
|
+
|
70
|
+
The method that gets called whenever the plugin receives a record batch on an input.
|
71
|
+
|
72
|
+
This method IS NOT called during update-only mode.
|
73
|
+
|
74
|
+
Parameters
|
75
|
+
----------
|
76
|
+
batch
|
77
|
+
A pyarrow Table containing the received batch.
|
78
|
+
anchor
|
79
|
+
A namedtuple('Anchor', ['name', 'connection']) containing input connection identifiers.
|
80
|
+
"""
|
81
|
+
try:
|
82
|
+
out_anchor = self.conn_to_output[anchor.connection]
|
83
|
+
self.provider.write_to_anchor(out_anchor, table)
|
84
|
+
except Exception as e:
|
85
|
+
self.provider.io.warn(
|
86
|
+
f"Failed to write batch to output anchor. \n{repr(e)}"
|
87
|
+
)
|
88
|
+
|
89
|
+
def on_complete(self) -> None:
|
90
|
+
"""
|
91
|
+
Clean up any plugin resources, or push records for an input tool.
|
92
|
+
|
93
|
+
This method gets called when all other plugin processing is complete.
|
94
|
+
|
95
|
+
In this method, a Plugin designer should perform any cleanup for their plugin.
|
96
|
+
However, if the plugin is an input-type tool (it has no incoming connections),
|
97
|
+
processing (record generation) should occur here.
|
98
|
+
|
99
|
+
Note: A tool with an optional input anchor and no incoming connections should
|
100
|
+
also write any records to output anchors here.
|
101
|
+
"""
|
102
|
+
self.provider.io.info("AyxSdkMultiConnectionsMultiOutputAnchor tool done.")
|
another_ayx_python_sdk/examples/AyxSdkMultipleInputAnchors/AyxSdkMultipleInputAnchorsConfig.xml
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
<AlteryxJavaScriptPlugin>
|
2
|
+
<EngineSettings EngineDll="Python" EngineDllEntryPoint="main.py" SDKVersion="10.1" ToolFamily="AyxPluginSdkExamples" />
|
3
|
+
<GuiSettings Html="index.html" Icon="icon.png" SDKVersion="10.1">
|
4
|
+
<InputConnections>
|
5
|
+
<Connection AllowMultiple="False" Label="" Name="Input1" Optional="False" Type="Connection" />
|
6
|
+
<Connection AllowMultiple="False" Label="" Name="Input2" Optional="False" Type="Connection" />
|
7
|
+
</InputConnections>
|
8
|
+
<OutputConnections>
|
9
|
+
<Connection AllowMultiple="False" Label="" Name="Output" Optional="False" Type="Connection" />
|
10
|
+
</OutputConnections>
|
11
|
+
</GuiSettings>
|
12
|
+
<Properties>
|
13
|
+
<MetaInfo>
|
14
|
+
<Name>AyxSdkMultipleInputAnchors</Name>
|
15
|
+
<Description>Example multiple input anchor tool.</Description>
|
16
|
+
<ToolVersion>1.0</ToolVersion>
|
17
|
+
<CategoryName>SDK Examples</CategoryName>
|
18
|
+
<SearchTags>python, sdk, python sdk</SearchTags>
|
19
|
+
<Author>Alteryx, Inc.</Author>
|
20
|
+
<Company>Alteryx, Inc.</Company>
|
21
|
+
<Copyright>2020</Copyright>
|
22
|
+
</MetaInfo>
|
23
|
+
</Properties>
|
24
|
+
</AlteryxJavaScriptPlugin>
|
Binary file
|
@@ -0,0 +1,84 @@
|
|
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
|
+
"""Example multiple input anchor tool."""
|
15
|
+
from typing import TYPE_CHECKING
|
16
|
+
|
17
|
+
from another_ayx_python_sdk.core import PluginV2
|
18
|
+
|
19
|
+
if TYPE_CHECKING:
|
20
|
+
from another_ayx_python_sdk.providers.amp_provider.amp_provider_v2 import AMPProviderV2
|
21
|
+
import pyarrow as pa
|
22
|
+
from another_ayx_python_sdk.core.constants import Anchor
|
23
|
+
|
24
|
+
|
25
|
+
class AyxSdkMultipleInputAnchors(PluginV2):
|
26
|
+
"""Concrete implementation of an AyxPlugin."""
|
27
|
+
|
28
|
+
def __init__(self, provider: "AMPProviderV2") -> None:
|
29
|
+
"""Construct a plugin."""
|
30
|
+
self.provider = provider
|
31
|
+
self.output_anchor_name = "Output"
|
32
|
+
self.provider.io.info("Plugin initialized.")
|
33
|
+
|
34
|
+
def on_incoming_connection_complete(self, anchor: "Anchor") -> None:
|
35
|
+
"""
|
36
|
+
Call when an incoming connection is done sending data including when no data is sent on an optional input anchor.
|
37
|
+
|
38
|
+
This method IS NOT called during update-only mode.
|
39
|
+
|
40
|
+
Parameters
|
41
|
+
----------
|
42
|
+
anchor
|
43
|
+
NamedTuple containing anchor.name and anchor.connection.
|
44
|
+
"""
|
45
|
+
self.provider.io.info(
|
46
|
+
f"Received complete update from {anchor.name}:{anchor.connection}."
|
47
|
+
)
|
48
|
+
|
49
|
+
def on_record_batch(self, table: "pa.Table", anchor: "Anchor") -> None:
|
50
|
+
"""
|
51
|
+
Process the passed record batch.
|
52
|
+
|
53
|
+
The method that gets called whenever the plugin receives a record batch on an input.
|
54
|
+
|
55
|
+
This method IS NOT called during update-only mode.
|
56
|
+
|
57
|
+
Parameters
|
58
|
+
----------
|
59
|
+
batch
|
60
|
+
A pyarrow Table containing the received batch.
|
61
|
+
anchor
|
62
|
+
A namedtuple('Anchor', ['name', 'connection']) containing input connection identifiers.
|
63
|
+
"""
|
64
|
+
try:
|
65
|
+
self.provider.write_to_anchor(self.output_anchor_name, table)
|
66
|
+
except Exception as e:
|
67
|
+
self.provider.io.warn(
|
68
|
+
f"Error Occured while writing to anchor {anchor.name} \n {repr(e)}"
|
69
|
+
)
|
70
|
+
|
71
|
+
def on_complete(self) -> None:
|
72
|
+
"""
|
73
|
+
Clean up any plugin resources, or push records for an input tool.
|
74
|
+
|
75
|
+
This method gets called when all other plugin processing is complete.
|
76
|
+
|
77
|
+
In this method, a Plugin designer should perform any cleanup for their plugin.
|
78
|
+
However, if the plugin is an input-type tool (it has no incoming connections),
|
79
|
+
processing (record generation) should occur here.
|
80
|
+
|
81
|
+
Note: A tool with an optional input anchor and no incoming connections should
|
82
|
+
also write any records to output anchors here.
|
83
|
+
"""
|
84
|
+
self.provider.io.info("AyxSdkMultipleInputAnchors tool done.")
|
Binary file
|
@@ -0,0 +1,96 @@
|
|
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
|
+
"""Example pass through tool."""
|
15
|
+
from another_ayx_python_sdk.core import (
|
16
|
+
Anchor,
|
17
|
+
PluginV2,
|
18
|
+
)
|
19
|
+
from another_ayx_python_sdk.providers.amp_provider.amp_provider_v2 import AMPProviderV2
|
20
|
+
|
21
|
+
from pandas.core.dtypes.common import is_integer_dtype
|
22
|
+
|
23
|
+
from pyarrow import RecordBatch, Table
|
24
|
+
|
25
|
+
|
26
|
+
class AyxSdkMultipleOutputAnchors(PluginV2):
|
27
|
+
"""A sample Plugin that filters numeric data for odd and even values."""
|
28
|
+
|
29
|
+
def __init__(self, provider: "AMPProviderV2"):
|
30
|
+
"""Construct the plugin."""
|
31
|
+
self.provider = provider
|
32
|
+
self.provider.io.info("AyxSdkMultipleOutputAnchors tool started.")
|
33
|
+
|
34
|
+
def on_record_batch(self, batch: "Table", anchor: "Anchor") -> None:
|
35
|
+
"""
|
36
|
+
Process the passed record batch.
|
37
|
+
|
38
|
+
The method that gets called whenever the plugin receives a record batch on an input.
|
39
|
+
|
40
|
+
This method IS NOT called during update-only mode.
|
41
|
+
|
42
|
+
Parameters
|
43
|
+
----------
|
44
|
+
batch
|
45
|
+
A pyarrow Table containing the received batch.
|
46
|
+
anchor
|
47
|
+
A namedtuple('Anchor', ['name', 'connection']) containing input connection identifiers.
|
48
|
+
"""
|
49
|
+
metadata = batch.schema
|
50
|
+
if not any([field_name == "Value" for field_name in metadata.names]):
|
51
|
+
raise RuntimeError(
|
52
|
+
"Incoming data must contain a column with the name 'Value'"
|
53
|
+
)
|
54
|
+
input_dataframe = batch.to_pandas()
|
55
|
+
|
56
|
+
if not is_integer_dtype(input_dataframe["Value"]):
|
57
|
+
raise RuntimeError("'Value' column must be of 'int' data type")
|
58
|
+
|
59
|
+
grouped = input_dataframe.groupby("Value")
|
60
|
+
odds = grouped.filter(lambda row: (row["Value"] % 2 == 1).any())
|
61
|
+
evens = grouped.filter(lambda row: (row["Value"] % 2 == 0).any())
|
62
|
+
|
63
|
+
odd_batch = RecordBatch.from_pandas(odds, preserve_index=False)
|
64
|
+
even_batch = RecordBatch.from_pandas(evens, preserve_index=False)
|
65
|
+
self.provider.write_to_anchor("Output1", odd_batch)
|
66
|
+
self.provider.write_to_anchor("Output2", even_batch)
|
67
|
+
|
68
|
+
def on_incoming_connection_complete(self, anchor: "Anchor") -> None:
|
69
|
+
"""
|
70
|
+
Call when an incoming connection is done sending data including when no data is sent on an optional input anchor.
|
71
|
+
|
72
|
+
This method IS NOT called during update-only mode.
|
73
|
+
|
74
|
+
Parameters
|
75
|
+
----------
|
76
|
+
anchor
|
77
|
+
NamedTuple containing anchor.name and anchor.connection.
|
78
|
+
"""
|
79
|
+
self.provider.io.info(
|
80
|
+
f"Received complete update from {anchor.name}:{anchor.connection}."
|
81
|
+
)
|
82
|
+
|
83
|
+
def on_complete(self) -> None:
|
84
|
+
"""
|
85
|
+
Clean up any plugin resources, or push records for an input tool.
|
86
|
+
|
87
|
+
This method gets called when all other plugin processing is complete.
|
88
|
+
|
89
|
+
In this method, a Plugin designer should perform any cleanup for their plugin.
|
90
|
+
However, if the plugin is an input-type tool (it has no incoming connections),
|
91
|
+
processing (record generation) should occur here.
|
92
|
+
|
93
|
+
Note: A tool with an optional input anchor and no incoming connections should
|
94
|
+
also write any records to output anchors here.
|
95
|
+
"""
|
96
|
+
self.provider.io.info("AyxSdkMultipleOutputAnchors tool done.")
|
Binary file
|
@@ -0,0 +1,94 @@
|
|
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
|
+
"""Example optional input anchor tool."""
|
15
|
+
from typing import TYPE_CHECKING
|
16
|
+
|
17
|
+
from another_ayx_python_sdk.core import PluginV2
|
18
|
+
|
19
|
+
import pyarrow as pa
|
20
|
+
|
21
|
+
if TYPE_CHECKING:
|
22
|
+
from another_ayx_python_sdk.providers.amp_provider.amp_provider_v2 import AMPProviderV2
|
23
|
+
from another_ayx_python_sdk.core.constants import Anchor
|
24
|
+
|
25
|
+
|
26
|
+
class AyxSdkOptionalInputAnchor(PluginV2):
|
27
|
+
"""Concrete implementation of an AyxPlugin."""
|
28
|
+
|
29
|
+
def __init__(self, provider: "AMPProviderV2") -> None:
|
30
|
+
"""Construct a plugin."""
|
31
|
+
self.provider = provider
|
32
|
+
self.config_value = 0.42
|
33
|
+
self.output_anchor = self.provider.outgoing_anchors["Output"]
|
34
|
+
self.input_anchor = self.provider.incoming_anchors["Input"]
|
35
|
+
self.provider.io.info("Plugin initialized.")
|
36
|
+
|
37
|
+
def on_incoming_connection_complete(self, anchor: "Anchor") -> None:
|
38
|
+
"""
|
39
|
+
Call when an incoming connection is done sending data including when no data is sent on an optional input anchor.
|
40
|
+
|
41
|
+
This method IS NOT called during update-only mode.
|
42
|
+
|
43
|
+
Parameters
|
44
|
+
----------
|
45
|
+
anchor
|
46
|
+
NamedTuple containing anchor.name and anchor.connection.
|
47
|
+
"""
|
48
|
+
self.provider.io.info(
|
49
|
+
f"Received complete update from {anchor.name}:{anchor.connection}."
|
50
|
+
)
|
51
|
+
|
52
|
+
def on_record_batch(self, batch: "pa.Table", anchor: "Anchor") -> None:
|
53
|
+
"""
|
54
|
+
Process the passed record batch.
|
55
|
+
|
56
|
+
The method that gets called whenever the plugin receives a record batch on an input.
|
57
|
+
|
58
|
+
This method IS NOT called during update-only mode.
|
59
|
+
|
60
|
+
Parameters
|
61
|
+
----------
|
62
|
+
batch
|
63
|
+
A pyarrow Table containing the received batch.
|
64
|
+
anchor
|
65
|
+
A namedtuple('Anchor', ['name', 'connection']) containing input connection identifiers.
|
66
|
+
"""
|
67
|
+
try:
|
68
|
+
self.provider.write_to_anchor("Output", batch)
|
69
|
+
except Exception as e:
|
70
|
+
self.provider.io.warn(
|
71
|
+
f"Error Occured while writing to anchor {anchor.name} \n {repr(e)}"
|
72
|
+
)
|
73
|
+
|
74
|
+
def on_complete(self) -> None:
|
75
|
+
"""
|
76
|
+
Clean up any plugin resources, or push records for an input tool.
|
77
|
+
|
78
|
+
This method gets called when all other plugin processing is complete.
|
79
|
+
|
80
|
+
In this method, a Plugin designer should perform any cleanup for their plugin.
|
81
|
+
However, if the plugin is an input-type tool (it has no incoming connections),
|
82
|
+
processing (record generation) should occur here.
|
83
|
+
|
84
|
+
Note: A tool with an optional input anchor and no incoming connections should
|
85
|
+
also write any records to output anchors here.
|
86
|
+
"""
|
87
|
+
if len(self.input_anchor.keys()) == 0:
|
88
|
+
import pandas as pd
|
89
|
+
|
90
|
+
df = pd.DataFrame({"OptionalField": [self.config_value]})
|
91
|
+
batch_to_send = pa.RecordBatch.from_pandas(df=df, preserve_index=False)
|
92
|
+
self.provider.write_to_anchor("Output", batch_to_send)
|
93
|
+
|
94
|
+
self.provider.io.info("AyxSdkOptionalInputAnchor tool done.")
|
@@ -0,0 +1,78 @@
|
|
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
|
+
"""Example output tool."""
|
15
|
+
|
16
|
+
from another_ayx_python_sdk.core import (
|
17
|
+
Anchor,
|
18
|
+
PluginV2,
|
19
|
+
)
|
20
|
+
from another_ayx_python_sdk.providers.amp_provider.amp_provider_v2 import AMPProviderV2
|
21
|
+
|
22
|
+
import pyarrow as pa
|
23
|
+
|
24
|
+
|
25
|
+
class AyxSdkOutput(PluginV2):
|
26
|
+
"""A sample Plugin that passes data from an input connection to an output connection."""
|
27
|
+
|
28
|
+
def __init__(self, provider: AMPProviderV2):
|
29
|
+
"""Construct a plugin."""
|
30
|
+
self.provider = provider
|
31
|
+
self.provider.io.info("AyxSdkOutput tool started")
|
32
|
+
|
33
|
+
def on_record_batch(self, batch: "pa.Table", anchor: Anchor) -> None:
|
34
|
+
"""
|
35
|
+
Process the passed record batch.
|
36
|
+
|
37
|
+
The method that gets called whenever the plugin receives a record batch on an input.
|
38
|
+
|
39
|
+
This method IS NOT called during update-only mode.
|
40
|
+
|
41
|
+
Parameters
|
42
|
+
----------
|
43
|
+
batch
|
44
|
+
A pyarrow Table containing the received batch.
|
45
|
+
anchor
|
46
|
+
A namedtuple('Anchor', ['name', 'connection']) containing input connection identifiers.
|
47
|
+
"""
|
48
|
+
self.provider.io.info(batch.to_string().replace("\n", " | "))
|
49
|
+
|
50
|
+
def on_incoming_connection_complete(self, anchor: Anchor) -> None:
|
51
|
+
"""
|
52
|
+
Call when an incoming connection is done sending data including when no data is sent on an optional input anchor.
|
53
|
+
|
54
|
+
This method IS NOT called during update-only mode.
|
55
|
+
|
56
|
+
Parameters
|
57
|
+
----------
|
58
|
+
anchor
|
59
|
+
NamedTuple containing anchor.name and anchor.connection.
|
60
|
+
"""
|
61
|
+
self.provider.io.info(
|
62
|
+
f"Received complete update from {anchor.name}:{anchor.connection}."
|
63
|
+
)
|
64
|
+
|
65
|
+
def on_complete(self) -> None:
|
66
|
+
"""
|
67
|
+
Clean up any plugin resources, or push records for an input tool.
|
68
|
+
|
69
|
+
This method gets called when all other plugin processing is complete.
|
70
|
+
|
71
|
+
In this method, a Plugin designer should perform any cleanup for their plugin.
|
72
|
+
However, if the plugin is an input-type tool (it has no incoming connections),
|
73
|
+
processing (record generation) should occur here.
|
74
|
+
|
75
|
+
Note: A tool with an optional input anchor and no incoming connections should
|
76
|
+
also write any records to output anchors here.
|
77
|
+
"""
|
78
|
+
self.provider.io.info(f"AyxSdkOutput tool done.")
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<AlteryxJavaScriptPlugin>
|
2
|
+
<EngineSettings EngineDll="Python" EngineDllEntryPoint="main.py" SDKVersion="10.1" ToolFamily="AyxPluginSdkExamples" />
|
3
|
+
<GuiSettings Html="index.html" Icon="icon.png" SDKVersion="10.1">
|
4
|
+
<InputConnections>
|
5
|
+
<Connection AllowMultiple="False" Label="" Name="Input" Optional="False" Type="Connection" />
|
6
|
+
</InputConnections>
|
7
|
+
<OutputConnections>
|
8
|
+
<Connection AllowMultiple="False" Label="" Name="Output" Optional="False" Type="Connection" />
|
9
|
+
</OutputConnections>
|
10
|
+
</GuiSettings>
|
11
|
+
<Properties>
|
12
|
+
<MetaInfo>
|
13
|
+
<Name>AyxSdkPassThrough</Name>
|
14
|
+
<Description>Example pass through tool</Description>
|
15
|
+
<ToolVersion>1.0</ToolVersion>
|
16
|
+
<CategoryName>SDK Examples</CategoryName>
|
17
|
+
<SearchTags>python, sdk, python sdk</SearchTags>
|
18
|
+
<Author>Alteryx, Inc.</Author>
|
19
|
+
<Company>Alteryx, Inc.</Company>
|
20
|
+
<Copyright>2020</Copyright>
|
21
|
+
</MetaInfo>
|
22
|
+
</Properties>
|
23
|
+
</AlteryxJavaScriptPlugin>
|
Binary file
|
@@ -0,0 +1,82 @@
|
|
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
|
+
|
15
|
+
"""Example pass through tool."""
|
16
|
+
from typing import TYPE_CHECKING
|
17
|
+
|
18
|
+
from another_ayx_python_sdk.core import (
|
19
|
+
Anchor,
|
20
|
+
PluginV2,
|
21
|
+
)
|
22
|
+
from another_ayx_python_sdk.providers.amp_provider.amp_provider_v2 import AMPProviderV2
|
23
|
+
|
24
|
+
if TYPE_CHECKING:
|
25
|
+
import pyarrow as pa
|
26
|
+
|
27
|
+
|
28
|
+
class AyxSdkPassThrough(PluginV2):
|
29
|
+
"""A sample Plugin that passes data from an input connection to an output connection."""
|
30
|
+
|
31
|
+
def __init__(self, provider: AMPProviderV2):
|
32
|
+
"""Construct the plugin."""
|
33
|
+
self.name = "AyxSdkPassThrough"
|
34
|
+
self.provider = provider
|
35
|
+
self.provider.io.info(f"{self.name} tool started")
|
36
|
+
|
37
|
+
def on_record_batch(self, batch: "pa.Table", anchor: Anchor) -> None:
|
38
|
+
"""
|
39
|
+
Process the passed record batch.
|
40
|
+
|
41
|
+
The method that gets called whenever the plugin receives a record batch on an input.
|
42
|
+
|
43
|
+
This method IS NOT called during update-only mode.
|
44
|
+
|
45
|
+
Parameters
|
46
|
+
----------
|
47
|
+
batch
|
48
|
+
A pyarrow Table containing the received batch.
|
49
|
+
anchor
|
50
|
+
A namedtuple('Anchor', ['name', 'connection']) containing input connection identifiers.
|
51
|
+
"""
|
52
|
+
self.provider.write_to_anchor("Output", batch)
|
53
|
+
|
54
|
+
def on_incoming_connection_complete(self, anchor: Anchor) -> None:
|
55
|
+
"""
|
56
|
+
Call when an incoming connection is done sending data including when no data is sent on an optional input anchor.
|
57
|
+
|
58
|
+
This method IS NOT called during update-only mode.
|
59
|
+
|
60
|
+
Parameters
|
61
|
+
----------
|
62
|
+
anchor
|
63
|
+
NamedTuple containing anchor.name and anchor.connection.
|
64
|
+
"""
|
65
|
+
self.provider.io.info(
|
66
|
+
f"Received complete update from {anchor.name}:{anchor.connection}."
|
67
|
+
)
|
68
|
+
|
69
|
+
def on_complete(self) -> None:
|
70
|
+
"""
|
71
|
+
Clean up any plugin resources, or push records for an input tool.
|
72
|
+
|
73
|
+
This method gets called when all other plugin processing is complete.
|
74
|
+
|
75
|
+
In this method, a Plugin designer should perform any cleanup for their plugin.
|
76
|
+
However, if the plugin is an input-type tool (it has no incoming connections),
|
77
|
+
processing (record generation) should occur here.
|
78
|
+
|
79
|
+
Note: A tool with an optional input anchor and no incoming connections should
|
80
|
+
also write any records to output anchors here.
|
81
|
+
"""
|
82
|
+
self.provider.io.info(f"{self.name} tool done.")
|
@@ -0,0 +1,18 @@
|
|
1
|
+
ayx_python_sdk
|
2
|
+
Click==7.1.2
|
3
|
+
grpcio==1.28.1
|
4
|
+
grpcio-tools==1.28.1
|
5
|
+
numpy==1.19.1
|
6
|
+
pandas==1.1.0
|
7
|
+
protobuf==3.20.1
|
8
|
+
psutil==5.6.3
|
9
|
+
pydantic==1.5.1
|
10
|
+
python-dateutil==2.8.1
|
11
|
+
pytz==2020.1
|
12
|
+
setuptools==46.1.3
|
13
|
+
six==1.14.0
|
14
|
+
typer==0.3.1
|
15
|
+
xmltodict==0.12.0
|
16
|
+
pyarrow==5.0.0
|
17
|
+
deprecation==2.1.0
|
18
|
+
wincertstore==0.2
|
@@ -0,0 +1,14 @@
|
|
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 Python SDK: RecordProviders."""
|
Binary file
|