another-ayx-python-sdk 2.4.23__py3-none-any.whl → 2.4.24__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.
Files changed (212) hide show
  1. another_ayx_python_sdk/version.py +3 -3
  2. {another_ayx_python_sdk-2.4.23.dist-info → another_ayx_python_sdk-2.4.24.dist-info}/METADATA +2 -2
  3. {another_ayx_python_sdk-2.4.23.dist-info → another_ayx_python_sdk-2.4.24.dist-info}/RECORD +212 -7
  4. {another_ayx_python_sdk-2.4.23.dist-info → another_ayx_python_sdk-2.4.24.dist-info}/top_level.txt +2 -0
  5. build/lib/another_ayx_python_sdk/__init__.py +14 -0
  6. build/lib/another_ayx_python_sdk/__main__.py +470 -0
  7. build/lib/another_ayx_python_sdk/assets/workspace_files/__init__.py +14 -0
  8. build/lib/another_ayx_python_sdk/assets/workspace_files/setup.py +38 -0
  9. build/lib/another_ayx_python_sdk/cli/__init__.py +14 -0
  10. build/lib/another_ayx_python_sdk/cli/utilities.py +103 -0
  11. build/lib/another_ayx_python_sdk/cli/workspace.py +266 -0
  12. build/lib/another_ayx_python_sdk/cli/yxi_builder.py +125 -0
  13. build/lib/another_ayx_python_sdk/cli/yxi_installer.py +45 -0
  14. build/lib/another_ayx_python_sdk/core/__init__.py +51 -0
  15. build/lib/another_ayx_python_sdk/core/constants.py +25 -0
  16. build/lib/another_ayx_python_sdk/core/dcm_base.py +115 -0
  17. build/lib/another_ayx_python_sdk/core/doc_utilities.py +40 -0
  18. build/lib/another_ayx_python_sdk/core/environment_base.py +213 -0
  19. build/lib/another_ayx_python_sdk/core/exceptions.py +59 -0
  20. build/lib/another_ayx_python_sdk/core/field.py +183 -0
  21. build/lib/another_ayx_python_sdk/core/input_anchor_base.py +86 -0
  22. build/lib/another_ayx_python_sdk/core/input_connection_base.py +206 -0
  23. build/lib/another_ayx_python_sdk/core/io_base.py +139 -0
  24. build/lib/another_ayx_python_sdk/core/metadata.py +173 -0
  25. build/lib/another_ayx_python_sdk/core/observable_mixin.py +90 -0
  26. build/lib/another_ayx_python_sdk/core/output_anchor_base.py +151 -0
  27. build/lib/another_ayx_python_sdk/core/plugin.py +108 -0
  28. build/lib/another_ayx_python_sdk/core/plugin_v2.py +97 -0
  29. build/lib/another_ayx_python_sdk/core/provider_base.py +125 -0
  30. build/lib/another_ayx_python_sdk/core/proxy_requests.py +51 -0
  31. build/lib/another_ayx_python_sdk/core/record_packet.py +88 -0
  32. build/lib/another_ayx_python_sdk/core/record_packet_base.py +123 -0
  33. build/lib/another_ayx_python_sdk/core/register_plugin.py +127 -0
  34. build/lib/another_ayx_python_sdk/core/testing.py +191 -0
  35. build/lib/another_ayx_python_sdk/core/utils.py +146 -0
  36. build/lib/another_ayx_python_sdk/examples/AyxSdkInput/main.py +89 -0
  37. build/lib/another_ayx_python_sdk/examples/AyxSdkMultiConnectionsMultiOutputAnchor/main.py +102 -0
  38. build/lib/another_ayx_python_sdk/examples/AyxSdkMultipleInputAnchors/main.py +84 -0
  39. build/lib/another_ayx_python_sdk/examples/AyxSdkMultipleOutputAnchors/main.py +96 -0
  40. build/lib/another_ayx_python_sdk/examples/AyxSdkOptionalInputAnchor/main.py +94 -0
  41. build/lib/another_ayx_python_sdk/examples/AyxSdkOutput/main.py +78 -0
  42. build/lib/another_ayx_python_sdk/examples/AyxSdkPassThrough/main.py +82 -0
  43. build/lib/another_ayx_python_sdk/providers/__init__.py +14 -0
  44. build/lib/another_ayx_python_sdk/providers/amp_provider/__init__.py +41 -0
  45. build/lib/another_ayx_python_sdk/providers/amp_provider/__main__.py +85 -0
  46. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_dcm.py +58 -0
  47. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_driver.py +358 -0
  48. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_environment.py +73 -0
  49. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_environment_v2.py +278 -0
  50. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_input_anchor.py +73 -0
  51. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_input_connection.py +132 -0
  52. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_io.py +64 -0
  53. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_io_components.py +407 -0
  54. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_output_anchor.py +107 -0
  55. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_provider.py +68 -0
  56. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_provider_v2.py +128 -0
  57. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_record_packet.py +21 -0
  58. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/__init__.py +32 -0
  59. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/input_anchor_builder.py +123 -0
  60. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/input_connection_builder.py +95 -0
  61. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/metadata_builder.py +118 -0
  62. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/output_anchor_builder.py +110 -0
  63. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/packers.py +458 -0
  64. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/record_builder.py +204 -0
  65. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/record_packet_builder.py +133 -0
  66. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/tool_config_builder.py +59 -0
  67. build/lib/another_ayx_python_sdk/providers/amp_provider/cng_certs.py +197 -0
  68. build/lib/another_ayx_python_sdk/providers/amp_provider/data_transport/__init__.py +18 -0
  69. build/lib/another_ayx_python_sdk/providers/amp_provider/data_transport/amp_transport.py +127 -0
  70. build/lib/another_ayx_python_sdk/providers/amp_provider/data_transport/transport_base.py +35 -0
  71. build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_helpers/__init__.py +14 -0
  72. build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_helpers/control_msgs.py +189 -0
  73. build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_helpers/dcme_msgs.py +119 -0
  74. build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_helpers/record_transfer_msgs.py +32 -0
  75. build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_util.py +161 -0
  76. build/lib/another_ayx_python_sdk/providers/amp_provider/logger_config.py +63 -0
  77. build/lib/another_ayx_python_sdk/providers/amp_provider/plugin_class_loader.py +77 -0
  78. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/__init__.py +67 -0
  79. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/dcm_repository.py +252 -0
  80. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/environment_repository.py +212 -0
  81. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/grpc_repository.py +119 -0
  82. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/input_anchor_repository.py +110 -0
  83. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/input_connection_repository.py +276 -0
  84. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/input_metadata_repository.py +144 -0
  85. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/input_record_packet_repository.py +252 -0
  86. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/io_repository.py +188 -0
  87. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/output_anchor_repository.py +117 -0
  88. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/output_metadata_repository.py +129 -0
  89. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/output_record_packet_repository.py +170 -0
  90. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/plugin_class_repository.py +55 -0
  91. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/singleton.py +32 -0
  92. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/test_harness_state_repository.py +172 -0
  93. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/tool_config_repository.py +89 -0
  94. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/__init__.py +14 -0
  95. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/__init__.py +0 -0
  96. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/close_outgoing_anchor_pb2.py +25 -0
  97. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/close_outgoing_anchor_pb2_grpc.py +4 -0
  98. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/dcm_e_pb2.py +38 -0
  99. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/dcm_e_pb2_grpc.py +4 -0
  100. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_anchor_pb2.py +26 -0
  101. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_anchor_pb2_grpc.py +4 -0
  102. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_complete_pb2.py +25 -0
  103. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_complete_pb2_grpc.py +4 -0
  104. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_pb2.py +26 -0
  105. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_pb2_grpc.py +4 -0
  106. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_data_push_pb2.py +26 -0
  107. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_data_push_pb2_grpc.py +4 -0
  108. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_record_packet_push_pb2.py +26 -0
  109. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_record_packet_push_pb2_grpc.py +4 -0
  110. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/metadata_pb2.py +31 -0
  111. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/metadata_pb2_grpc.py +4 -0
  112. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_anchor_pb2.py +28 -0
  113. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_anchor_pb2_grpc.py +4 -0
  114. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_data_push_pb2.py +26 -0
  115. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_data_push_pb2_grpc.py +4 -0
  116. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_metadata_push_pb2.py +26 -0
  117. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_metadata_push_pb2_grpc.py +4 -0
  118. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_record_packet_push_pb2.py +26 -0
  119. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_record_packet_push_pb2_grpc.py +4 -0
  120. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/output_message_data_pb2.py +29 -0
  121. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/output_message_data_pb2_grpc.py +4 -0
  122. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/password_data_pb2.py +25 -0
  123. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/password_data_pb2_grpc.py +4 -0
  124. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/plugin_initialization_data_pb2.py +33 -0
  125. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/plugin_initialization_data_pb2_grpc.py +4 -0
  126. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/record_batch_pb2.py +25 -0
  127. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/record_batch_pb2_grpc.py +4 -0
  128. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/record_packet_pb2.py +29 -0
  129. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/record_packet_pb2_grpc.py +4 -0
  130. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_engine_service_pb2.py +34 -0
  131. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_engine_service_pb2_grpc.py +305 -0
  132. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_pb2.py +30 -0
  133. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_pb2_grpc.py +235 -0
  134. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_startup_info_pb2.py +25 -0
  135. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_startup_info_pb2_grpc.py +4 -0
  136. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_v2_pb2.py +54 -0
  137. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_v2_pb2_grpc.py +99 -0
  138. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/translate_message_data_pb2.py +27 -0
  139. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/translate_message_data_pb2_grpc.py +4 -0
  140. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/transport_pb2.py +31 -0
  141. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/transport_pb2_grpc.py +4 -0
  142. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/update_progress_pb2.py +25 -0
  143. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/update_progress_pb2_grpc.py +4 -0
  144. build/lib/another_ayx_python_sdk/providers/amp_provider/sdk_tool_runner.py +115 -0
  145. build/lib/another_ayx_python_sdk/providers/amp_provider/sdk_tool_service.py +207 -0
  146. build/lib/another_ayx_python_sdk/providers/amp_provider/sdk_tool_service_v2.py +306 -0
  147. build/lib/another_ayx_python_sdk/providers/amp_provider/utilities/__init__.py +14 -0
  148. build/lib/another_ayx_python_sdk/providers/amp_provider/utilities/constants.py +22 -0
  149. build/lib/another_ayx_python_sdk/providers/amp_provider/utilities/conversions.py +55 -0
  150. build/lib/another_ayx_python_sdk/providers/amp_provider/utilities/utilities.py +63 -0
  151. build/lib/another_ayx_python_sdk/providers/e1_provider/__init__.py +36 -0
  152. build/lib/another_ayx_python_sdk/providers/e1_provider/anchor_builder.py +95 -0
  153. build/lib/another_ayx_python_sdk/providers/e1_provider/cache_e1_sdk_import.py +31 -0
  154. build/lib/another_ayx_python_sdk/providers/e1_provider/connection_callback_strategy.py +155 -0
  155. build/lib/another_ayx_python_sdk/providers/e1_provider/connection_interface.py +125 -0
  156. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_dcm.py +53 -0
  157. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_environment.py +127 -0
  158. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_input_anchor.py +51 -0
  159. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_input_anchor_proxy.py +33 -0
  160. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_input_connection.py +87 -0
  161. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_io.py +71 -0
  162. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_output_anchor.py +157 -0
  163. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_output_anchor_proxy.py +97 -0
  164. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_plugin_driver.py +63 -0
  165. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_plugin_proxy.py +363 -0
  166. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_provider.py +71 -0
  167. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_record_packet.py +21 -0
  168. build/lib/another_ayx_python_sdk/providers/e1_provider/events.py +36 -0
  169. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/__init__.py +37 -0
  170. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/alteryx_engine.py +105 -0
  171. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/constants.py +50 -0
  172. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/field.py +122 -0
  173. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/output_anchor.py +55 -0
  174. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/output_anchor_manager.py +31 -0
  175. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_copier.py +65 -0
  176. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_creator.py +41 -0
  177. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_info.py +134 -0
  178. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_ref.py +42 -0
  179. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/tool.py +29 -0
  180. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/tool_execution_info.py +43 -0
  181. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/__init__.py +14 -0
  182. build/lib/another_ayx_python_sdk/providers/e1_provider/proxies/__init__.py +18 -0
  183. build/lib/another_ayx_python_sdk/providers/e1_provider/proxies/field_proxy.py +109 -0
  184. build/lib/another_ayx_python_sdk/providers/e1_provider/proxies/record_copier_proxy.py +49 -0
  185. build/lib/another_ayx_python_sdk/providers/e1_provider/records/__init__.py +23 -0
  186. build/lib/another_ayx_python_sdk/providers/e1_provider/records/base_record_container.py +47 -0
  187. build/lib/another_ayx_python_sdk/providers/e1_provider/records/parsed_record_container.py +67 -0
  188. build/lib/another_ayx_python_sdk/providers/e1_provider/records/raw_record_container.py +111 -0
  189. build/lib/another_ayx_python_sdk/providers/e1_provider/tool_config_loader.py +132 -0
  190. build/lib/another_ayx_python_sdk/providers/e1_provider/utilities/__init__.py +35 -0
  191. build/lib/another_ayx_python_sdk/providers/e1_provider/utilities/utilities.py +54 -0
  192. build/lib/another_ayx_python_sdk/providers/e1_provider/workflow_config.py +31 -0
  193. build/lib/another_ayx_python_sdk/providers/file_provider/__init__.py +32 -0
  194. build/lib/another_ayx_python_sdk/providers/file_provider/environment.py +131 -0
  195. build/lib/another_ayx_python_sdk/providers/file_provider/file_adapter.py +286 -0
  196. build/lib/another_ayx_python_sdk/providers/file_provider/file_provider.py +185 -0
  197. build/lib/another_ayx_python_sdk/providers/file_provider/file_provider_dcm.py +53 -0
  198. build/lib/another_ayx_python_sdk/providers/file_provider/file_provider_input_anchor.py +70 -0
  199. build/lib/another_ayx_python_sdk/providers/file_provider/file_provider_input_connection.py +112 -0
  200. build/lib/another_ayx_python_sdk/providers/file_provider/file_provider_output_anchor.py +114 -0
  201. build/lib/another_ayx_python_sdk/providers/file_provider/file_record_packet.py +21 -0
  202. build/lib/another_ayx_python_sdk/providers/file_provider/iox.py +56 -0
  203. build/lib/another_ayx_python_sdk/providers/file_provider/tool_input.py +104 -0
  204. build/lib/another_ayx_python_sdk/test_harness/__init__.py +14 -0
  205. build/lib/another_ayx_python_sdk/test_harness/__main__.py +120 -0
  206. build/lib/another_ayx_python_sdk/test_harness/plugin_runner.py +416 -0
  207. build/lib/another_ayx_python_sdk/test_harness/process_lifecycle_manager.py +80 -0
  208. build/lib/another_ayx_python_sdk/test_harness/sdk_engine_service.py +106 -0
  209. build/lib/another_ayx_python_sdk/version.py +8 -0
  210. {another_ayx_python_sdk-2.4.23.dist-info → another_ayx_python_sdk-2.4.24.dist-info}/WHEEL +0 -0
  211. {another_ayx_python_sdk-2.4.23.dist-info → another_ayx_python_sdk-2.4.24.dist-info}/entry_points.txt +0 -0
  212. {another_ayx_python_sdk-2.4.23.dist-info → another_ayx_python_sdk-2.4.24.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,122 @@
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
+ """Mock field class definition."""
15
+ from typing import Any, Callable, Iterable, Mapping, TYPE_CHECKING
16
+
17
+ from .constants import FieldType
18
+ from .record_ref import RecordRef
19
+
20
+ if TYPE_CHECKING:
21
+ from .record_creator import RecordCreator
22
+
23
+
24
+ def _return_none_on_type_error(func: Callable) -> Callable:
25
+ def inner(*args: Iterable, **kwargs: Mapping) -> Any:
26
+ try:
27
+ return func(*args, **kwargs)
28
+ except TypeError:
29
+ return None
30
+
31
+ return inner
32
+
33
+
34
+ class Field:
35
+ """Field mock."""
36
+
37
+ def __init__(
38
+ self,
39
+ name: str,
40
+ type: FieldType,
41
+ size: int,
42
+ scale: int,
43
+ source: str,
44
+ description: str,
45
+ ) -> None:
46
+ """Construct a field."""
47
+ self.name = name
48
+ self.type = type
49
+ self.size = size
50
+ self.scale = scale
51
+ self.source = source
52
+ self.description = description
53
+
54
+ def equal_type(self, other_field: "Field") -> bool:
55
+ """Check if another field has an equal type."""
56
+ return (
57
+ self.type == other_field.type
58
+ and self.size == other_field.size
59
+ and self.scale == other_field.scale
60
+ )
61
+
62
+ @_return_none_on_type_error
63
+ def get_as_bool(self, record_ref: RecordRef) -> bool:
64
+ """Get value of field as a boolean."""
65
+ return bool(record_ref.get_field(self.name))
66
+
67
+ @_return_none_on_type_error
68
+ def get_as_double(self, record_ref: RecordRef) -> float:
69
+ """Get value of a field as a double."""
70
+ return float(record_ref.get_field(self.name))
71
+
72
+ @_return_none_on_type_error
73
+ def get_as_int32(self, record_ref: RecordRef) -> int:
74
+ """Get value of a field as an int32."""
75
+ return int(record_ref.get_field(self.name))
76
+
77
+ @_return_none_on_type_error
78
+ def get_as_int64(self, record_ref: RecordRef) -> int:
79
+ """Get value of a field as an int64."""
80
+ return int(record_ref.get_field(self.name))
81
+
82
+ @_return_none_on_type_error
83
+ def get_as_string(self, record_ref: RecordRef) -> str:
84
+ """Get value of a field as a string."""
85
+ return str(record_ref.get_field(self.name))
86
+
87
+ @_return_none_on_type_error
88
+ def get_as_blob(self, record_ref: RecordRef) -> bytes:
89
+ """Get value of a field as a blob."""
90
+ return bytes(record_ref.get_field(self.name))
91
+
92
+ def get_null(self, record_ref: RecordRef) -> bool:
93
+ """Check if the value of a field is null."""
94
+ return record_ref.get_field(self.name) is None
95
+
96
+ def set_from_bool(self, record_creator: "RecordCreator", value: bool) -> None:
97
+ """Set value of a field as a boolean."""
98
+ record_creator.set_field(self.name, bool(value))
99
+
100
+ def set_from_double(self, record_creator: "RecordCreator", value: float) -> None:
101
+ """Set value of a field as a double."""
102
+ record_creator.set_field(self.name, float(value))
103
+
104
+ def set_from_int32(self, record_creator: "RecordCreator", value: int) -> None:
105
+ """Set value of a field as an int32."""
106
+ record_creator.set_field(self.name, int(value))
107
+
108
+ def set_from_int64(self, record_creator: "RecordCreator", value: int) -> None:
109
+ """Set value of a field as an int64."""
110
+ record_creator.set_field(self.name, int(value))
111
+
112
+ def set_from_string(self, record_creator: "RecordCreator", value: str) -> None:
113
+ """Set value of a field as a string."""
114
+ record_creator.set_field(self.name, str(value))
115
+
116
+ def set_from_blob(self, record_creator: "RecordCreator", value: bytes) -> None:
117
+ """Set value of a field as a blob."""
118
+ record_creator.set_field(self.name, bytes(value))
119
+
120
+ def set_null(self, record_creator: "RecordCreator") -> None:
121
+ """Set value of a field to null."""
122
+ record_creator.set_field(self.name, None)
@@ -0,0 +1,55 @@
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
+ """Mock output anchor class definition."""
15
+ from typing import List, Optional, TYPE_CHECKING
16
+
17
+ if TYPE_CHECKING:
18
+ from .record_info import RecordInfo
19
+ from .record_ref import RecordRef
20
+
21
+
22
+ class OutputAnchor:
23
+ """Output anchor mock."""
24
+
25
+ def __init__(self) -> None:
26
+ self.is_closed: bool = False
27
+ self.record_info: Optional["RecordInfo"] = None
28
+ self.pushed_records: List["RecordRef"] = []
29
+ self.progress = 0.0
30
+
31
+ def assert_close(self) -> None:
32
+ """Assert the output anchor is closed."""
33
+ assert self.is_closed
34
+
35
+ def close(self) -> None:
36
+ """Close the output anchor."""
37
+ self.is_closed = True
38
+
39
+ def init(self, record_info_out: "RecordInfo", sort_info_xml: str = "") -> bool:
40
+ """Initialize the output anchor with record metadata."""
41
+ self.record_info = record_info_out
42
+ return True
43
+
44
+ def output_record_count(self, final: bool) -> None:
45
+ """Output the record count to Designer."""
46
+ raise NotImplementedError()
47
+
48
+ def push_record(self, record_ref: "RecordRef", no_auto_close: bool = False) -> bool:
49
+ """Push a record downstream."""
50
+ self.pushed_records.append(record_ref)
51
+ return True
52
+
53
+ def update_progress(self, percent: float) -> None:
54
+ """Update progress."""
55
+ self.progress = percent
@@ -0,0 +1,31 @@
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
+ """Mock output anchor manager class definition."""
15
+ from typing import Mapping, Optional, TYPE_CHECKING
16
+
17
+ if TYPE_CHECKING:
18
+ from .output_anchor import OutputAnchor # noqa
19
+
20
+
21
+ class OutputAnchorManager:
22
+ """Output anchor manager mock."""
23
+
24
+ def __init__(self, output_anchor_map: Mapping[str, "OutputAnchor"]):
25
+ self._output_anchor_map = output_anchor_map
26
+
27
+ def get_output_anchor(
28
+ self, output_connection_name: str
29
+ ) -> Optional["OutputAnchor"]:
30
+ """Get an output anchor by name."""
31
+ return self._output_anchor_map.get(output_connection_name)
@@ -0,0 +1,65 @@
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
+ """Mock record copier class definition."""
15
+ from typing import Dict, TYPE_CHECKING
16
+
17
+
18
+ if TYPE_CHECKING:
19
+ from .record_creator import RecordCreator
20
+ from .record_info import RecordInfo
21
+ from .record_ref import RecordRef
22
+
23
+
24
+ class RecordCopier:
25
+ """Record copier mock."""
26
+
27
+ def __init__(
28
+ self,
29
+ destination: "RecordInfo",
30
+ source: "RecordInfo",
31
+ suppress_size_only_conversion_errors: bool = False,
32
+ decimal_separator: str = ".",
33
+ ) -> None:
34
+ """Construct a record copier."""
35
+ self.destination = destination
36
+ self.source = source
37
+ self.supress_size_only_conversion_errors = suppress_size_only_conversion_errors
38
+ self.decimal_separator = decimal_separator
39
+ self._done_adding = False
40
+ self._idx_map: Dict[int, int] = {}
41
+
42
+ def add(self, destination_field_num: int, source_field_num: int) -> None:
43
+ """Add a field to the record copier."""
44
+ if self._done_adding:
45
+ raise RuntimeError("Done adding, can't add any more.")
46
+
47
+ self._idx_map[source_field_num] = destination_field_num
48
+
49
+ def done_adding(self) -> None:
50
+ """Signal that fields are done being added."""
51
+ self._done_adding = True
52
+
53
+ def copy(self, destination: "RecordCreator", source: "RecordRef") -> None:
54
+ """Copy a record to the destination format."""
55
+ for source_idx, dest_idx in self._idx_map.items():
56
+ source_key = list(source.data.keys())[source_idx]
57
+ dest_key = list(destination.record_ref.data.keys())[dest_idx]
58
+
59
+ destination.record_ref.data[dest_key] = source.data[source_key]
60
+
61
+ @staticmethod
62
+ def set_dest_to_null(destination: "RecordCreator") -> None:
63
+ """Set destination to all null."""
64
+ for key in destination.record_ref.data:
65
+ destination.record_ref.data[key] = None
@@ -0,0 +1,41 @@
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
+ """Mock record creator class definition."""
15
+ from typing import Any, TYPE_CHECKING
16
+
17
+ from .record_ref import RecordRef
18
+
19
+ if TYPE_CHECKING:
20
+ from .record_info import RecordInfo
21
+
22
+
23
+ class RecordCreator:
24
+ """Record Creator mock."""
25
+
26
+ def __init__(self, record_info: "RecordInfo") -> None:
27
+ """Construct a record creator."""
28
+ self.record_ref = RecordRef(record_info)
29
+ self.record_info = record_info
30
+
31
+ def finalize_record(self) -> RecordRef:
32
+ """Finalize a record ref."""
33
+ return self.record_ref
34
+
35
+ def reset(self, var_data_size: int = 0) -> None:
36
+ """Reset the creator."""
37
+ self.record_ref = RecordRef(self.record_info)
38
+
39
+ def set_field(self, name: str, value: Any) -> None:
40
+ """Set a field in the underlying record ref."""
41
+ self.record_ref.set_field(name, value)
@@ -0,0 +1,134 @@
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
+ """Mock record info class definition."""
15
+ from copy import deepcopy
16
+ from typing import Generator, List, Optional
17
+
18
+ from .alteryx_engine import AlteryxEngine
19
+ from .constants import FieldType
20
+ from .field import Field
21
+ from .record_creator import RecordCreator
22
+
23
+
24
+ class RecordInfo:
25
+ """Record info mock."""
26
+
27
+ def __init__(self, alteryx_engine: AlteryxEngine) -> None:
28
+ """Construct a record info."""
29
+ self.fields: List["Field"] = []
30
+ self.alteryx_engine = alteryx_engine
31
+
32
+ def add_field(
33
+ self,
34
+ field_name: str,
35
+ field_type: FieldType,
36
+ size: int = 0,
37
+ scale: int = 0,
38
+ source: str = "",
39
+ description: str = "",
40
+ ) -> "Field":
41
+ """Add a field to the record info."""
42
+ self.fields.append(
43
+ Field(
44
+ name=field_name,
45
+ type=field_type,
46
+ size=size,
47
+ scale=scale,
48
+ source=source,
49
+ description=description,
50
+ )
51
+ )
52
+
53
+ return self.fields[-1]
54
+
55
+ def add_field_from_xml(self, xml: str, name_prefix: str = "") -> "Field":
56
+ """Add a field from an XML string definition."""
57
+ raise NotImplementedError()
58
+
59
+ def clone(self) -> "RecordInfo":
60
+ """Make a copy of the record info."""
61
+ return deepcopy(self)
62
+
63
+ def construct_record_creator(self) -> RecordCreator:
64
+ """Create a new record creator."""
65
+ return RecordCreator(self)
66
+
67
+ def equal_types(
68
+ self, record_info: "RecordInfo", allow_additional_fields: bool = False
69
+ ) -> bool:
70
+ """Check if another record info object has equal types to this."""
71
+ if not allow_additional_fields and len(self) < len(record_info):
72
+ return False
73
+
74
+ for self_field, other_field in zip(self, record_info):
75
+ if self_field.type != other_field.type:
76
+ return False
77
+
78
+ return True
79
+
80
+ def get_field_by_name(
81
+ self, field_name: str, throw_error: bool = True
82
+ ) -> Optional["Field"]:
83
+ """Get a field object by field name."""
84
+ for field in self:
85
+ if field.name == field_name:
86
+ return field
87
+
88
+ if throw_error:
89
+ raise RuntimeError("Field name not found.")
90
+
91
+ return None
92
+
93
+ def get_field_num(self, field_name: str, throw_error: bool = True) -> int:
94
+ """Get the index of a field by name."""
95
+ for idx, field in enumerate(self.fields):
96
+ if field.name == field_name:
97
+ return idx
98
+
99
+ if throw_error:
100
+ raise RuntimeError()
101
+
102
+ return -1
103
+
104
+ def get_hash(self) -> int:
105
+ """Get hash of this record info."""
106
+ raise NotImplementedError()
107
+
108
+ def get_record_xml_meta_data(self, include_source: bool = True) -> str:
109
+ """Get XML metadata string."""
110
+ raise NotImplementedError()
111
+
112
+ def init_from_xml(self, xml: str, name_prefix: str = "") -> None:
113
+ """Initialize this record info from an XML string."""
114
+ raise NotImplementedError()
115
+
116
+ def rename_field_by_index(self, field_idx: int, new_name: str) -> "Field":
117
+ """Rename a field by index."""
118
+ raise NotImplementedError()
119
+
120
+ def rename_field_by_name(self, old_name: str, new_name: str) -> "Field":
121
+ """Rename a field by name."""
122
+ raise NotImplementedError()
123
+
124
+ def swap_field_names(self, field_1: int, field_2: int) -> None:
125
+ """Swap two field names."""
126
+ raise NotImplementedError()
127
+
128
+ def __iter__(self) -> Generator["Field", None, None]:
129
+ """Iterate over fields in this record info."""
130
+ yield from self.fields
131
+
132
+ def __len__(self) -> int:
133
+ """Get the number of fields available."""
134
+ return len(self.fields)
@@ -0,0 +1,42 @@
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
+ """Mock record ref class definition."""
15
+ from typing import Any, Dict, TYPE_CHECKING
16
+
17
+ if TYPE_CHECKING:
18
+ from .record_info import RecordInfo
19
+
20
+
21
+ class RecordRef:
22
+ """Record ref mock."""
23
+
24
+ def __init__(self, record_info: "RecordInfo") -> None:
25
+ """Construct a record ref."""
26
+ self.data: Dict[str, Any] = {field.name: None for field in record_info}
27
+ self.record_info = record_info
28
+
29
+ def set_field(self, name: str, value: Any) -> None:
30
+ """Set a field to a value."""
31
+ self.data[name] = value
32
+
33
+ def get_field(self, name: str) -> Any:
34
+ """Get the value of a field."""
35
+ return self.data[name]
36
+
37
+ def __eq__(self, other: object) -> bool:
38
+ """Compare two record refs for equality."""
39
+ if not isinstance(other, RecordRef):
40
+ return NotImplemented
41
+
42
+ return self.data == other.data
@@ -0,0 +1,29 @@
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
+ """Tool definition."""
15
+ from typing import Any, TYPE_CHECKING
16
+
17
+ if TYPE_CHECKING:
18
+ from .alteryx_engine import AlteryxEngine
19
+
20
+
21
+ class Tool:
22
+ """Instance of a tool in a workflow along with associated data structures."""
23
+
24
+ def __init__(self, engine: "AlteryxEngine", plugin_instance: Any) -> None:
25
+ """Construct a new tool object."""
26
+ self.engine = engine
27
+ self.plugin_instance = plugin_instance
28
+ self.output_manager = None
29
+ self.tool_id = None
@@ -0,0 +1,43 @@
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 definition for tool execution information."""
15
+ from typing import List, Optional
16
+
17
+
18
+ class ToolExecutionInfo:
19
+ """Tool execution info class."""
20
+
21
+ def __init__(self) -> None:
22
+ """Construct a tool execution information object."""
23
+ self.errors: List[str] = []
24
+ self.warnings: List[str] = []
25
+ self.infos: List[str] = []
26
+ self.output_workflow_xml: Optional[str] = None
27
+ self.progress: float = 0.0
28
+
29
+ def add_error(self, error: str) -> None:
30
+ """Add an error message to the info."""
31
+ self.errors.append(error)
32
+
33
+ def add_warning(self, warning: str) -> None:
34
+ """Add an warning message to the info."""
35
+ self.warnings.append(warning)
36
+
37
+ def add_info(self, info: str) -> None:
38
+ """Add an info message to the info."""
39
+ self.infos.append(info)
40
+
41
+ def set_output_workflow_xml(self, xml: str) -> None:
42
+ """Track the output tool workflow XML."""
43
+ self.output_workflow_xml = xml
@@ -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
+ """Mock alteryx python SDK package for use when not running in Designer."""
@@ -0,0 +1,18 @@
1
+ # Copyright (C) 2022 Alteryx, Inc. All rights reserved.
2
+ #
3
+ # Licensed under the ALTERYX SDK AND API LICENSE AGREEMENT;
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.alteryx.com/alteryx-sdk-and-api-license-agreement
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """Proxy classes for raw Python SDK classes."""
15
+ from .field_proxy import FieldProxy
16
+ from .record_copier_proxy import RecordCopierProxy
17
+
18
+ __all__ = ["FieldProxy", "RecordCopierProxy"]