another-ayx-python-sdk 2.4.21__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.21.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.21.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.21.dist-info/RECORD +0 -403
- {another_ayx_python_sdk-2.4.21.dist-info → another_ayx_python_sdk-2.4.22.dist-info}/WHEEL +0 -0
- {another_ayx_python_sdk-2.4.21.dist-info → another_ayx_python_sdk-2.4.22.dist-info}/entry_points.txt +0 -0
- {another_ayx_python_sdk-2.4.21.dist-info → another_ayx_python_sdk-2.4.22.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,266 @@
|
|
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
|
+
"""Configurations for managing the workspace."""
|
15
|
+
import copy
|
16
|
+
import json
|
17
|
+
import os
|
18
|
+
import shutil
|
19
|
+
import string
|
20
|
+
import xml.etree.ElementTree as Et
|
21
|
+
from pathlib import Path
|
22
|
+
from typing import Any, Dict, List
|
23
|
+
|
24
|
+
from another_ayx_python_sdk.cli.utilities import get_install_dir
|
25
|
+
from another_ayx_python_sdk.cli.yxi_builder import YxiBuilder
|
26
|
+
|
27
|
+
from pydantic import BaseModel
|
28
|
+
|
29
|
+
import xmltodict
|
30
|
+
|
31
|
+
|
32
|
+
WORKSPACE_CONFIGURATION_FILE_NAME = "ayx_workspace.json"
|
33
|
+
|
34
|
+
|
35
|
+
class WorkspaceError(Exception):
|
36
|
+
"""Exception for workspace errors."""
|
37
|
+
|
38
|
+
pass
|
39
|
+
|
40
|
+
|
41
|
+
class Workspace(BaseModel):
|
42
|
+
"""Class that wraps all workspace configurations and handles basic workspace functions."""
|
43
|
+
|
44
|
+
workspace_dir: Path
|
45
|
+
tools: List[str]
|
46
|
+
yxi_name: str
|
47
|
+
tool_family_name: str
|
48
|
+
|
49
|
+
@classmethod
|
50
|
+
def build_workspace(
|
51
|
+
cls, workspace_directory: Path, allow_creation: bool = False
|
52
|
+
) -> "Workspace":
|
53
|
+
"""Create a workspace instance that wraps the configurations for the given workspace_directory."""
|
54
|
+
if not workspace_directory.is_dir():
|
55
|
+
if allow_creation:
|
56
|
+
Workspace._create_workspace_directory(workspace_directory)
|
57
|
+
else:
|
58
|
+
raise WorkspaceError("Workspace directory not found.")
|
59
|
+
|
60
|
+
workspace_config_path = workspace_directory / WORKSPACE_CONFIGURATION_FILE_NAME
|
61
|
+
|
62
|
+
if not workspace_config_path.exists():
|
63
|
+
raise WorkspaceError(
|
64
|
+
"ERROR: Specified workspace_directory isn't a workspace directory, "
|
65
|
+
f"since a {WORKSPACE_CONFIGURATION_FILE_NAME} file doesn't exist."
|
66
|
+
"Please use an existing workspace, or specify a directory that doesn't exist yet."
|
67
|
+
)
|
68
|
+
|
69
|
+
with open(
|
70
|
+
str(workspace_directory / WORKSPACE_CONFIGURATION_FILE_NAME), "r"
|
71
|
+
) as f:
|
72
|
+
raw_data = json.load(f)
|
73
|
+
migrated_data = cls.migrate_raw_workspace_config(raw_data)
|
74
|
+
|
75
|
+
workspace = cls(workspace_dir=workspace_directory, **migrated_data)
|
76
|
+
|
77
|
+
if migrated_data != raw_data:
|
78
|
+
workspace.write()
|
79
|
+
|
80
|
+
return workspace
|
81
|
+
|
82
|
+
@classmethod
|
83
|
+
def _create_workspace_directory(cls, workspace_directory: Path) -> None:
|
84
|
+
"""Copy the base configs to the tool directory."""
|
85
|
+
cls._copy_base_workspace_config(workspace_directory)
|
86
|
+
|
87
|
+
workspace = cls(
|
88
|
+
workspace_dir=workspace_directory,
|
89
|
+
yxi_name=workspace_directory.resolve().name,
|
90
|
+
tool_family_name=workspace_directory.resolve().name,
|
91
|
+
tools=[],
|
92
|
+
)
|
93
|
+
workspace.write()
|
94
|
+
|
95
|
+
@staticmethod
|
96
|
+
def _copy_base_workspace_config(workspace_directory: Path) -> None:
|
97
|
+
install_dir = get_install_dir()
|
98
|
+
shutil.copytree(
|
99
|
+
str(install_dir / "assets" / "base_tool_config"),
|
100
|
+
str(workspace_directory),
|
101
|
+
)
|
102
|
+
shutil.copy(
|
103
|
+
str(install_dir / "examples" / "requirements.txt"),
|
104
|
+
str(workspace_directory),
|
105
|
+
)
|
106
|
+
|
107
|
+
@classmethod
|
108
|
+
def migrate_raw_workspace_config(cls, data: Dict) -> Dict:
|
109
|
+
"""Migrate raw JSON from old format to new format."""
|
110
|
+
migrated_data = copy.deepcopy(data)
|
111
|
+
|
112
|
+
if "tools" in data:
|
113
|
+
tools = migrated_data["tools"]
|
114
|
+
|
115
|
+
if not isinstance(tools, list):
|
116
|
+
raise WorkspaceError(
|
117
|
+
"tools field in config file not properly formatted."
|
118
|
+
)
|
119
|
+
|
120
|
+
migrated_data["tools"] = [cls._migrate_tool(tool) for tool in tools]
|
121
|
+
else:
|
122
|
+
migrated_data["tools"] = []
|
123
|
+
|
124
|
+
return migrated_data
|
125
|
+
|
126
|
+
@staticmethod
|
127
|
+
def _migrate_tool(tool: Any) -> str:
|
128
|
+
# We migrated from a tools object, to just a simple list of tool names
|
129
|
+
if isinstance(tool, str):
|
130
|
+
return tool
|
131
|
+
|
132
|
+
if isinstance(tool, dict):
|
133
|
+
if "name" not in tool:
|
134
|
+
raise WorkspaceError(
|
135
|
+
f"Couldn't find tool name in tool {tool} during migration."
|
136
|
+
)
|
137
|
+
|
138
|
+
name: str = tool["name"]
|
139
|
+
return name
|
140
|
+
|
141
|
+
raise WorkspaceError(
|
142
|
+
f"Couldn't parse tool {tool} during migration. "
|
143
|
+
"It should be a string, or an object with a 'name' key"
|
144
|
+
)
|
145
|
+
|
146
|
+
def add_tool_from_template(self, tool_name: str, template_tool_name: str) -> None:
|
147
|
+
"""Add a tool to the workspace."""
|
148
|
+
tool_name_without_whitespace = remove_whitespace(tool_name)
|
149
|
+
|
150
|
+
if not tool_name_without_whitespace.isalnum():
|
151
|
+
raise WorkspaceError(f"The tool name is not alpha numeric: {tool_name}.")
|
152
|
+
|
153
|
+
new_tool_directory = (
|
154
|
+
self.workspace_dir / tool_name_without_whitespace
|
155
|
+
).resolve()
|
156
|
+
if new_tool_directory.is_dir():
|
157
|
+
raise WorkspaceError(
|
158
|
+
f"The plugin '{tool_name_without_whitespace}' already exists in the workspace."
|
159
|
+
)
|
160
|
+
|
161
|
+
example_tool_directory = get_install_dir() / "examples" / template_tool_name
|
162
|
+
shutil.copytree(str(example_tool_directory), str(new_tool_directory))
|
163
|
+
|
164
|
+
self._update_config_file(template_tool_name, tool_name)
|
165
|
+
self._update_main_py(template_tool_name, tool_name_without_whitespace)
|
166
|
+
|
167
|
+
self.tools.append(tool_name_without_whitespace)
|
168
|
+
self.write()
|
169
|
+
|
170
|
+
def _update_config_file(self, example_tool_name: str, new_tool_name: str) -> None:
|
171
|
+
new_tool_name_no_whitespace = remove_whitespace(new_tool_name)
|
172
|
+
old_config_path = (
|
173
|
+
self.workspace_dir
|
174
|
+
/ new_tool_name_no_whitespace
|
175
|
+
/ f"{example_tool_name}Config.xml"
|
176
|
+
)
|
177
|
+
new_config_path = (
|
178
|
+
old_config_path.parent / f"{new_tool_name_no_whitespace}Config.xml"
|
179
|
+
)
|
180
|
+
|
181
|
+
os.rename(str(old_config_path), str(new_config_path))
|
182
|
+
|
183
|
+
with open(str(new_config_path)) as f:
|
184
|
+
config = xmltodict.parse(f.read())
|
185
|
+
|
186
|
+
config["AlteryxJavaScriptPlugin"]["Properties"]["MetaInfo"][
|
187
|
+
"Name"
|
188
|
+
] = new_tool_name
|
189
|
+
|
190
|
+
with open(str(new_config_path), "w") as f:
|
191
|
+
f.write(xmltodict.unparse(config, pretty=True))
|
192
|
+
|
193
|
+
def _update_main_py(self, example_tool_name: str, new_tool_name: str) -> None:
|
194
|
+
"""Update the name of the tool in the main.py file."""
|
195
|
+
main_filepath = self.workspace_dir / new_tool_name / "main.py"
|
196
|
+
with open(str(main_filepath), "r") as f:
|
197
|
+
content = f.read()
|
198
|
+
|
199
|
+
content = content.replace(example_tool_name, new_tool_name)
|
200
|
+
with open(str(main_filepath), "w") as f:
|
201
|
+
f.write(content)
|
202
|
+
|
203
|
+
def delete_tool(self, tool_name: str) -> None:
|
204
|
+
"""Remove a tool from the workspace."""
|
205
|
+
tool_name_without_whitespace = remove_whitespace(tool_name)
|
206
|
+
if tool_name_without_whitespace not in self.tools:
|
207
|
+
raise WorkspaceError(
|
208
|
+
f"No tool folder found for {tool_name_without_whitespace}"
|
209
|
+
)
|
210
|
+
|
211
|
+
tool_path = self.workspace_dir / tool_name_without_whitespace
|
212
|
+
shutil.rmtree(tool_path, ignore_errors=True)
|
213
|
+
self.tools.remove(tool_name_without_whitespace)
|
214
|
+
self.write()
|
215
|
+
|
216
|
+
def build_yxi(
|
217
|
+
self, output_yxi_path: Path, package_requirements: bool = True
|
218
|
+
) -> None:
|
219
|
+
"""Build a YXI for the workspace."""
|
220
|
+
if not self.tools:
|
221
|
+
raise WorkspaceError("No tools have been added yet.")
|
222
|
+
|
223
|
+
self._set_tool_family()
|
224
|
+
YxiBuilder(
|
225
|
+
self.workspace_dir, output_yxi_path, self.tools[0], package_requirements
|
226
|
+
).build_yxi()
|
227
|
+
|
228
|
+
def _set_tool_family(self) -> None:
|
229
|
+
"""Ensure the workspace Config.xml and sub tools contains the tool family."""
|
230
|
+
xml_paths = [self.workspace_dir / "Config.xml"] + [
|
231
|
+
self.workspace_dir / tool / f"{tool}Config.xml" for tool in self.tools
|
232
|
+
]
|
233
|
+
|
234
|
+
for path in xml_paths:
|
235
|
+
with open(str(path), "r") as config_file:
|
236
|
+
tree = Et.parse(config_file)
|
237
|
+
root_node = tree.getroot()
|
238
|
+
engine_settings = root_node.find("EngineSettings")
|
239
|
+
|
240
|
+
if engine_settings is None:
|
241
|
+
raise ValueError("Config XML doesn't contain EngineSettings tag.")
|
242
|
+
|
243
|
+
engine_settings.attrib["ToolFamily"] = self.tool_family_name
|
244
|
+
tree.write(str(path))
|
245
|
+
|
246
|
+
def write(self) -> None:
|
247
|
+
"""Write the workspace configurations to the workspace directory."""
|
248
|
+
workspace_config_path = self.workspace_dir / WORKSPACE_CONFIGURATION_FILE_NAME
|
249
|
+
with open(str(workspace_config_path), "w") as workspace_config_file:
|
250
|
+
workspace_config_file.write(
|
251
|
+
self.json(
|
252
|
+
exclude={
|
253
|
+
"workspace_dir": ...,
|
254
|
+
"tools": {"__all__": {"ToolDirectory"}},
|
255
|
+
},
|
256
|
+
indent=2,
|
257
|
+
)
|
258
|
+
)
|
259
|
+
|
260
|
+
|
261
|
+
def remove_whitespace(s: str) -> str:
|
262
|
+
"""Remove whitespace from a string."""
|
263
|
+
for whitespace_char in string.whitespace:
|
264
|
+
s = s.replace(whitespace_char, "")
|
265
|
+
|
266
|
+
return s
|
@@ -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
|
+
"""Class for building YXIs."""
|
15
|
+
import os
|
16
|
+
import shutil
|
17
|
+
import subprocess
|
18
|
+
import sys
|
19
|
+
import tempfile
|
20
|
+
import uuid
|
21
|
+
from pathlib import Path
|
22
|
+
|
23
|
+
|
24
|
+
class YxiBuilder:
|
25
|
+
"""YXI Builder class."""
|
26
|
+
|
27
|
+
def __init__(
|
28
|
+
self,
|
29
|
+
workspace_dir: Path,
|
30
|
+
output_yxi_path: Path,
|
31
|
+
requirements_tool: str,
|
32
|
+
package_requirements: bool = True,
|
33
|
+
) -> None:
|
34
|
+
"""Construct a YXI Builder."""
|
35
|
+
self._workspace_dir = workspace_dir
|
36
|
+
self._output_yxi_path = output_yxi_path
|
37
|
+
self._requirements_tool = requirements_tool
|
38
|
+
self._package_requirements = package_requirements
|
39
|
+
|
40
|
+
def build_yxi(self) -> None:
|
41
|
+
"""Build the YXI."""
|
42
|
+
zip_path = Path(f"{uuid.uuid4()}.zip")
|
43
|
+
|
44
|
+
with tempfile.TemporaryDirectory() as yxi_temp_folder:
|
45
|
+
yxi_temp_path = Path(yxi_temp_folder) / "temp"
|
46
|
+
self._copy_workspace(yxi_temp_path)
|
47
|
+
|
48
|
+
if self._package_requirements:
|
49
|
+
self._handle_requirements(yxi_temp_path)
|
50
|
+
|
51
|
+
self._delete_pycache_directories(yxi_temp_path)
|
52
|
+
|
53
|
+
shutil.make_archive(zip_path.stem, "zip", str(yxi_temp_path))
|
54
|
+
|
55
|
+
shutil.move(str(zip_path), str(self._output_yxi_path))
|
56
|
+
|
57
|
+
def _copy_workspace(self, dest_dir: Path) -> None:
|
58
|
+
shutil.copytree(str(self._workspace_dir), str(dest_dir))
|
59
|
+
|
60
|
+
def _handle_requirements(self, temp_yxi_dir: Path) -> None:
|
61
|
+
workspace_requirements_path = self._workspace_dir / "requirements.txt"
|
62
|
+
temp_tools_requirements_path = (
|
63
|
+
temp_yxi_dir / self._requirements_tool / "requirements.txt"
|
64
|
+
)
|
65
|
+
|
66
|
+
# Copy requirements to requirements tool
|
67
|
+
shutil.copy(str(workspace_requirements_path), str(temp_tools_requirements_path))
|
68
|
+
|
69
|
+
# E1 Provider ships wheels inside of a tool, so we must link to them in the
|
70
|
+
# requirements.txt so that the pip install finds the wheels offline
|
71
|
+
self._add_link_wheels_to_requirements(temp_tools_requirements_path)
|
72
|
+
|
73
|
+
# Download wheels to the requirements tool wheels directory
|
74
|
+
self._download_pip_packages(
|
75
|
+
temp_yxi_dir / self._requirements_tool / "wheels",
|
76
|
+
workspace_requirements_path,
|
77
|
+
)
|
78
|
+
|
79
|
+
def _add_link_wheels_to_requirements(self, requirements_path: Path) -> None:
|
80
|
+
user_install_wheels = f'--find-links "${{APPDATA}}/Alteryx/Tools/{self._requirements_tool}/wheels"\n'
|
81
|
+
admin_install_wheels = f'--find-links "${{ALLUSERSPROFILE}}/Alteryx/Tools/{self._requirements_tool}/wheels"\n'
|
82
|
+
|
83
|
+
with requirements_path.open(mode="r") as requirements_file:
|
84
|
+
requirements = requirements_file.readlines()
|
85
|
+
|
86
|
+
full_requirements_list = [
|
87
|
+
user_install_wheels,
|
88
|
+
admin_install_wheels,
|
89
|
+
] + requirements
|
90
|
+
|
91
|
+
with requirements_path.open(mode="w") as requirements_file:
|
92
|
+
requirements_file.writelines(full_requirements_list)
|
93
|
+
|
94
|
+
@staticmethod
|
95
|
+
def _download_pip_packages(dest_dir: Path, requirements_path: Path) -> None:
|
96
|
+
"""Download the pip wheels and store in dest_dir."""
|
97
|
+
dest_dir.mkdir()
|
98
|
+
|
99
|
+
commands = [
|
100
|
+
sys.executable,
|
101
|
+
"-m",
|
102
|
+
"pip",
|
103
|
+
"download",
|
104
|
+
"--platform",
|
105
|
+
"win_amd64",
|
106
|
+
"--no-deps",
|
107
|
+
"-r",
|
108
|
+
f"{requirements_path}",
|
109
|
+
"-d",
|
110
|
+
f"{dest_dir}",
|
111
|
+
]
|
112
|
+
|
113
|
+
subprocess.run(commands)
|
114
|
+
|
115
|
+
@staticmethod
|
116
|
+
def _delete_pycache_directories(root_dir: Path) -> None:
|
117
|
+
"""Delete all the pycache subdirectories of a given root."""
|
118
|
+
pycache_dirs = [
|
119
|
+
Path(root) / directory
|
120
|
+
for root, directories, _ in os.walk(str(root_dir))
|
121
|
+
for directory in directories
|
122
|
+
if directory == "__pycache__"
|
123
|
+
]
|
124
|
+
for directory in pycache_dirs:
|
125
|
+
shutil.rmtree(str(directory), ignore_errors=True)
|
@@ -0,0 +1,45 @@
|
|
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
|
+
"""Wrappers to handle interactions with YXI Installer."""
|
15
|
+
from pathlib import Path
|
16
|
+
from typing import List
|
17
|
+
|
18
|
+
|
19
|
+
class YxiInstaller:
|
20
|
+
"""Class that wraps install commands from the YXI Installer executable."""
|
21
|
+
|
22
|
+
def __init__(
|
23
|
+
self,
|
24
|
+
yxi_paths: List[Path],
|
25
|
+
alteryx_path: Path,
|
26
|
+
clean: bool = False,
|
27
|
+
update_venv: bool = False,
|
28
|
+
) -> None:
|
29
|
+
if len(yxi_paths) < 1:
|
30
|
+
raise ValueError("At least one yxi path is required for the yxi installer.")
|
31
|
+
|
32
|
+
self.yxi_paths = yxi_paths
|
33
|
+
self.alteryx_path = alteryx_path
|
34
|
+
self.clean = clean
|
35
|
+
self.update_venv = update_venv
|
36
|
+
|
37
|
+
@staticmethod
|
38
|
+
def _get_installer_artifact_path() -> Path:
|
39
|
+
"""Get the path to the YXI Installer excutable."""
|
40
|
+
curr_dir = Path(__file__).parent.parent.resolve()
|
41
|
+
return curr_dir / "assets" / "executables" / "yxi-installer.pyz"
|
42
|
+
|
43
|
+
def _get_yxi_paths(self) -> str:
|
44
|
+
"""Get the paths to the YXIs as a CLI string."""
|
45
|
+
return " ".join([str(path) for path in self.yxi_paths])
|
@@ -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 Python SDK: Core classes and interfaces."""
|
15
|
+
|
16
|
+
from .constants import Anchor, NULL_VALUE_PLACEHOLDER
|
17
|
+
from .dcm_base import DcmBase
|
18
|
+
from .environment_base import EnvironmentBase, UpdateMode
|
19
|
+
from .field import Field, FieldType
|
20
|
+
from .input_anchor_base import InputAnchorBase
|
21
|
+
from .input_connection_base import InputConnectionBase
|
22
|
+
from .io_base import IoBase
|
23
|
+
from .metadata import Metadata
|
24
|
+
from .output_anchor_base import OutputAnchorBase
|
25
|
+
from .plugin import Plugin
|
26
|
+
from .plugin_v2 import PluginV2
|
27
|
+
from .provider_base import ProviderBase
|
28
|
+
from .record_packet import RecordPacket
|
29
|
+
from .record_packet_base import RecordPacketBase
|
30
|
+
from .register_plugin import register_plugin
|
31
|
+
|
32
|
+
__all__ = [
|
33
|
+
"Anchor",
|
34
|
+
"EnvironmentBase",
|
35
|
+
"UpdateMode",
|
36
|
+
"DcmBase",
|
37
|
+
"Field",
|
38
|
+
"FieldType",
|
39
|
+
"InputAnchorBase",
|
40
|
+
"InputConnectionBase",
|
41
|
+
"IoBase",
|
42
|
+
"Metadata",
|
43
|
+
"OutputAnchorBase",
|
44
|
+
"RecordPacket",
|
45
|
+
"RecordPacketBase",
|
46
|
+
"Plugin",
|
47
|
+
"PluginV2",
|
48
|
+
"ProviderBase",
|
49
|
+
"register_plugin",
|
50
|
+
"NULL_VALUE_PLACEHOLDER",
|
51
|
+
]
|
@@ -0,0 +1,25 @@
|
|
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
|
+
"""Constant definitions."""
|
15
|
+
from collections import namedtuple
|
16
|
+
|
17
|
+
AWAIT_TIMEOUT = 5.0
|
18
|
+
|
19
|
+
NULL_VALUE_PLACEHOLDER = "AYX_SDK_NULL_VALUE_PLACEHOLDER"
|
20
|
+
|
21
|
+
AYX_PROXY_USERNAME_KEY = "ProxyCommonUserName"
|
22
|
+
AYX_PROXY_PASSWORD_KEY = "ProxyCommonPassword"
|
23
|
+
AYX_PROXY_CRED_REQ_KEY = "ProxyRequiresCredentials"
|
24
|
+
|
25
|
+
Anchor = namedtuple("Anchor", ["name", "connection"])
|
@@ -0,0 +1,115 @@
|
|
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
|
+
"""DCM API base class definition."""
|
15
|
+
import datetime as dt
|
16
|
+
from abc import ABC, abstractmethod
|
17
|
+
from typing import Dict, Optional
|
18
|
+
|
19
|
+
|
20
|
+
class DcmBase(ABC):
|
21
|
+
"""
|
22
|
+
Dcm base class.
|
23
|
+
|
24
|
+
This base class provides API to work with engine's DCM objects .
|
25
|
+
"""
|
26
|
+
|
27
|
+
@abstractmethod
|
28
|
+
def get_connection(self, connection_id: str) -> Dict:
|
29
|
+
"""
|
30
|
+
Retrieve connection information including secrets by connection ID.
|
31
|
+
|
32
|
+
Parameters
|
33
|
+
----------
|
34
|
+
connection_id
|
35
|
+
string with UUID of connection
|
36
|
+
"""
|
37
|
+
raise NotImplementedError()
|
38
|
+
|
39
|
+
@abstractmethod
|
40
|
+
def get_write_lock(
|
41
|
+
self,
|
42
|
+
connection_id: str,
|
43
|
+
role: str,
|
44
|
+
secret_type: str,
|
45
|
+
expires_in: Optional[dt.datetime],
|
46
|
+
) -> Dict:
|
47
|
+
"""
|
48
|
+
Attempt to acquire an exclusive write lock.
|
49
|
+
|
50
|
+
Parameters
|
51
|
+
----------
|
52
|
+
connection_id
|
53
|
+
string with UUID of connection
|
54
|
+
role
|
55
|
+
A role such as ?oauth?
|
56
|
+
secret_type
|
57
|
+
A secret type such as ?oauth_token?
|
58
|
+
expires_in
|
59
|
+
(Optional) A DateTime value in which to ask for the lock to be held for in milliseconds.
|
60
|
+
Defaults to 0.
|
61
|
+
"""
|
62
|
+
raise NotImplementedError()
|
63
|
+
|
64
|
+
@abstractmethod
|
65
|
+
def free_write_lock(
|
66
|
+
self, connection_id: str, role: str, secret_type: str, lock_id: str
|
67
|
+
) -> None:
|
68
|
+
"""
|
69
|
+
Free a lock obtained from a previous call to get_write_lock().
|
70
|
+
|
71
|
+
Parameters
|
72
|
+
----------
|
73
|
+
connection_id
|
74
|
+
string with UUID of connection
|
75
|
+
role
|
76
|
+
A role such as ?oauth?
|
77
|
+
secret_type
|
78
|
+
A secret type such as ?oauth_token?
|
79
|
+
lock_id
|
80
|
+
A lock_id acquired from a previous call to get_write_lock()
|
81
|
+
"""
|
82
|
+
raise NotImplementedError()
|
83
|
+
|
84
|
+
@abstractmethod
|
85
|
+
def update_connection_secret(
|
86
|
+
self,
|
87
|
+
connection_id: str,
|
88
|
+
lock_id: str,
|
89
|
+
role: str,
|
90
|
+
secret_type: str,
|
91
|
+
value: str,
|
92
|
+
expires_on: Optional[dt.datetime],
|
93
|
+
parameters: Optional[Dict[str, str]],
|
94
|
+
) -> Dict:
|
95
|
+
"""
|
96
|
+
Update a single secret for role and secret_type to value as well as the optional expires_on and parameters.
|
97
|
+
|
98
|
+
Parameters
|
99
|
+
----------
|
100
|
+
connection_id
|
101
|
+
A connection ID
|
102
|
+
lock_id
|
103
|
+
A lock ID acquired from get_write_lock()
|
104
|
+
role
|
105
|
+
A role such as ?oauth?
|
106
|
+
secret_type
|
107
|
+
A secret type such as ?oauth_token?
|
108
|
+
value
|
109
|
+
The new value to store for the secret
|
110
|
+
expires_on
|
111
|
+
(Optional) DateTime of expiration of this secret
|
112
|
+
parameters
|
113
|
+
Dict of parameter values for this secret (this is arbitrary user data stored as JSON)
|
114
|
+
"""
|
115
|
+
raise NotImplementedError()
|
@@ -0,0 +1,40 @@
|
|
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
|
+
"""Utility functions for documentation."""
|
15
|
+
import types
|
16
|
+
from typing import Type
|
17
|
+
|
18
|
+
|
19
|
+
def inherit_docs(cls: Type) -> Type:
|
20
|
+
"""
|
21
|
+
Inherit the documentation from parent classes if it doesn't exist on methods.
|
22
|
+
|
23
|
+
Parameters
|
24
|
+
----------
|
25
|
+
cls
|
26
|
+
The child class that inherits its parent's documentation.
|
27
|
+
|
28
|
+
Returns
|
29
|
+
-------
|
30
|
+
Type
|
31
|
+
Child class with documentation.
|
32
|
+
"""
|
33
|
+
for name, func in vars(cls).items():
|
34
|
+
if isinstance(func, types.FunctionType) and not func.__doc__:
|
35
|
+
for parent in cls.__bases__:
|
36
|
+
parent_func = getattr(parent, name, None)
|
37
|
+
if parent_func and getattr(parent_func, "__doc__", None):
|
38
|
+
func.__doc__ = parent_func.__doc__
|
39
|
+
break
|
40
|
+
return cls
|