another-ayx-python-sdk 2.4.24__py3-none-any.whl → 2.4.25__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.24.dist-info → another_ayx_python_sdk-2.4.25.dist-info}/METADATA +1 -1
  3. {another_ayx_python_sdk-2.4.24.dist-info → another_ayx_python_sdk-2.4.25.dist-info}/RECORD +7 -212
  4. {another_ayx_python_sdk-2.4.24.dist-info → another_ayx_python_sdk-2.4.25.dist-info}/top_level.txt +0 -2
  5. build/lib/another_ayx_python_sdk/__init__.py +0 -14
  6. build/lib/another_ayx_python_sdk/__main__.py +0 -470
  7. build/lib/another_ayx_python_sdk/assets/workspace_files/__init__.py +0 -14
  8. build/lib/another_ayx_python_sdk/assets/workspace_files/setup.py +0 -38
  9. build/lib/another_ayx_python_sdk/cli/__init__.py +0 -14
  10. build/lib/another_ayx_python_sdk/cli/utilities.py +0 -103
  11. build/lib/another_ayx_python_sdk/cli/workspace.py +0 -266
  12. build/lib/another_ayx_python_sdk/cli/yxi_builder.py +0 -125
  13. build/lib/another_ayx_python_sdk/cli/yxi_installer.py +0 -45
  14. build/lib/another_ayx_python_sdk/core/__init__.py +0 -51
  15. build/lib/another_ayx_python_sdk/core/constants.py +0 -25
  16. build/lib/another_ayx_python_sdk/core/dcm_base.py +0 -115
  17. build/lib/another_ayx_python_sdk/core/doc_utilities.py +0 -40
  18. build/lib/another_ayx_python_sdk/core/environment_base.py +0 -213
  19. build/lib/another_ayx_python_sdk/core/exceptions.py +0 -59
  20. build/lib/another_ayx_python_sdk/core/field.py +0 -183
  21. build/lib/another_ayx_python_sdk/core/input_anchor_base.py +0 -86
  22. build/lib/another_ayx_python_sdk/core/input_connection_base.py +0 -206
  23. build/lib/another_ayx_python_sdk/core/io_base.py +0 -139
  24. build/lib/another_ayx_python_sdk/core/metadata.py +0 -173
  25. build/lib/another_ayx_python_sdk/core/observable_mixin.py +0 -90
  26. build/lib/another_ayx_python_sdk/core/output_anchor_base.py +0 -151
  27. build/lib/another_ayx_python_sdk/core/plugin.py +0 -108
  28. build/lib/another_ayx_python_sdk/core/plugin_v2.py +0 -97
  29. build/lib/another_ayx_python_sdk/core/provider_base.py +0 -125
  30. build/lib/another_ayx_python_sdk/core/proxy_requests.py +0 -51
  31. build/lib/another_ayx_python_sdk/core/record_packet.py +0 -88
  32. build/lib/another_ayx_python_sdk/core/record_packet_base.py +0 -123
  33. build/lib/another_ayx_python_sdk/core/register_plugin.py +0 -127
  34. build/lib/another_ayx_python_sdk/core/testing.py +0 -191
  35. build/lib/another_ayx_python_sdk/core/utils.py +0 -146
  36. build/lib/another_ayx_python_sdk/examples/AyxSdkInput/main.py +0 -89
  37. build/lib/another_ayx_python_sdk/examples/AyxSdkMultiConnectionsMultiOutputAnchor/main.py +0 -102
  38. build/lib/another_ayx_python_sdk/examples/AyxSdkMultipleInputAnchors/main.py +0 -84
  39. build/lib/another_ayx_python_sdk/examples/AyxSdkMultipleOutputAnchors/main.py +0 -96
  40. build/lib/another_ayx_python_sdk/examples/AyxSdkOptionalInputAnchor/main.py +0 -94
  41. build/lib/another_ayx_python_sdk/examples/AyxSdkOutput/main.py +0 -78
  42. build/lib/another_ayx_python_sdk/examples/AyxSdkPassThrough/main.py +0 -82
  43. build/lib/another_ayx_python_sdk/providers/__init__.py +0 -14
  44. build/lib/another_ayx_python_sdk/providers/amp_provider/__init__.py +0 -41
  45. build/lib/another_ayx_python_sdk/providers/amp_provider/__main__.py +0 -85
  46. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_dcm.py +0 -58
  47. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_driver.py +0 -358
  48. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_environment.py +0 -73
  49. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_environment_v2.py +0 -278
  50. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_input_anchor.py +0 -73
  51. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_input_connection.py +0 -132
  52. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_io.py +0 -64
  53. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_io_components.py +0 -407
  54. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_output_anchor.py +0 -107
  55. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_provider.py +0 -68
  56. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_provider_v2.py +0 -128
  57. build/lib/another_ayx_python_sdk/providers/amp_provider/amp_record_packet.py +0 -21
  58. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/__init__.py +0 -32
  59. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/input_anchor_builder.py +0 -123
  60. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/input_connection_builder.py +0 -95
  61. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/metadata_builder.py +0 -118
  62. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/output_anchor_builder.py +0 -110
  63. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/packers.py +0 -458
  64. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/record_builder.py +0 -204
  65. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/record_packet_builder.py +0 -133
  66. build/lib/another_ayx_python_sdk/providers/amp_provider/builders/tool_config_builder.py +0 -59
  67. build/lib/another_ayx_python_sdk/providers/amp_provider/cng_certs.py +0 -197
  68. build/lib/another_ayx_python_sdk/providers/amp_provider/data_transport/__init__.py +0 -18
  69. build/lib/another_ayx_python_sdk/providers/amp_provider/data_transport/amp_transport.py +0 -127
  70. build/lib/another_ayx_python_sdk/providers/amp_provider/data_transport/transport_base.py +0 -35
  71. build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_helpers/__init__.py +0 -14
  72. build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_helpers/control_msgs.py +0 -189
  73. build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_helpers/dcme_msgs.py +0 -119
  74. build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_helpers/record_transfer_msgs.py +0 -32
  75. build/lib/another_ayx_python_sdk/providers/amp_provider/grpc_util.py +0 -161
  76. build/lib/another_ayx_python_sdk/providers/amp_provider/logger_config.py +0 -63
  77. build/lib/another_ayx_python_sdk/providers/amp_provider/plugin_class_loader.py +0 -77
  78. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/__init__.py +0 -67
  79. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/dcm_repository.py +0 -252
  80. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/environment_repository.py +0 -212
  81. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/grpc_repository.py +0 -119
  82. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/input_anchor_repository.py +0 -110
  83. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/input_connection_repository.py +0 -276
  84. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/input_metadata_repository.py +0 -144
  85. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/input_record_packet_repository.py +0 -252
  86. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/io_repository.py +0 -188
  87. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/output_anchor_repository.py +0 -117
  88. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/output_metadata_repository.py +0 -129
  89. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/output_record_packet_repository.py +0 -170
  90. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/plugin_class_repository.py +0 -55
  91. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/singleton.py +0 -32
  92. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/test_harness_state_repository.py +0 -172
  93. build/lib/another_ayx_python_sdk/providers/amp_provider/repositories/tool_config_repository.py +0 -89
  94. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/__init__.py +0 -14
  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 +0 -25
  97. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/close_outgoing_anchor_pb2_grpc.py +0 -4
  98. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/dcm_e_pb2.py +0 -38
  99. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/dcm_e_pb2_grpc.py +0 -4
  100. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_anchor_pb2.py +0 -26
  101. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_anchor_pb2_grpc.py +0 -4
  102. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_complete_pb2.py +0 -25
  103. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_complete_pb2_grpc.py +0 -4
  104. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_pb2.py +0 -26
  105. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_connection_pb2_grpc.py +0 -4
  106. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_data_push_pb2.py +0 -26
  107. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_data_push_pb2_grpc.py +0 -4
  108. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_record_packet_push_pb2.py +0 -26
  109. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/incoming_record_packet_push_pb2_grpc.py +0 -4
  110. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/metadata_pb2.py +0 -31
  111. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/metadata_pb2_grpc.py +0 -4
  112. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_anchor_pb2.py +0 -28
  113. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_anchor_pb2_grpc.py +0 -4
  114. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_data_push_pb2.py +0 -26
  115. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_data_push_pb2_grpc.py +0 -4
  116. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_metadata_push_pb2.py +0 -26
  117. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_metadata_push_pb2_grpc.py +0 -4
  118. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_record_packet_push_pb2.py +0 -26
  119. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/outgoing_record_packet_push_pb2_grpc.py +0 -4
  120. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/output_message_data_pb2.py +0 -29
  121. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/output_message_data_pb2_grpc.py +0 -4
  122. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/password_data_pb2.py +0 -25
  123. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/password_data_pb2_grpc.py +0 -4
  124. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/plugin_initialization_data_pb2.py +0 -33
  125. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/plugin_initialization_data_pb2_grpc.py +0 -4
  126. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/record_batch_pb2.py +0 -25
  127. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/record_batch_pb2_grpc.py +0 -4
  128. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/record_packet_pb2.py +0 -29
  129. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/record_packet_pb2_grpc.py +0 -4
  130. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_engine_service_pb2.py +0 -34
  131. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_engine_service_pb2_grpc.py +0 -305
  132. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_pb2.py +0 -30
  133. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_pb2_grpc.py +0 -235
  134. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_startup_info_pb2.py +0 -25
  135. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_startup_info_pb2_grpc.py +0 -4
  136. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_v2_pb2.py +0 -54
  137. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/sdk_tool_service_v2_pb2_grpc.py +0 -99
  138. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/translate_message_data_pb2.py +0 -27
  139. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/translate_message_data_pb2_grpc.py +0 -4
  140. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/transport_pb2.py +0 -31
  141. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/transport_pb2_grpc.py +0 -4
  142. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/update_progress_pb2.py +0 -25
  143. build/lib/another_ayx_python_sdk/providers/amp_provider/resources/generated/update_progress_pb2_grpc.py +0 -4
  144. build/lib/another_ayx_python_sdk/providers/amp_provider/sdk_tool_runner.py +0 -115
  145. build/lib/another_ayx_python_sdk/providers/amp_provider/sdk_tool_service.py +0 -207
  146. build/lib/another_ayx_python_sdk/providers/amp_provider/sdk_tool_service_v2.py +0 -306
  147. build/lib/another_ayx_python_sdk/providers/amp_provider/utilities/__init__.py +0 -14
  148. build/lib/another_ayx_python_sdk/providers/amp_provider/utilities/constants.py +0 -22
  149. build/lib/another_ayx_python_sdk/providers/amp_provider/utilities/conversions.py +0 -55
  150. build/lib/another_ayx_python_sdk/providers/amp_provider/utilities/utilities.py +0 -63
  151. build/lib/another_ayx_python_sdk/providers/e1_provider/__init__.py +0 -36
  152. build/lib/another_ayx_python_sdk/providers/e1_provider/anchor_builder.py +0 -95
  153. build/lib/another_ayx_python_sdk/providers/e1_provider/cache_e1_sdk_import.py +0 -31
  154. build/lib/another_ayx_python_sdk/providers/e1_provider/connection_callback_strategy.py +0 -155
  155. build/lib/another_ayx_python_sdk/providers/e1_provider/connection_interface.py +0 -125
  156. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_dcm.py +0 -53
  157. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_environment.py +0 -127
  158. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_input_anchor.py +0 -51
  159. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_input_anchor_proxy.py +0 -33
  160. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_input_connection.py +0 -87
  161. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_io.py +0 -71
  162. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_output_anchor.py +0 -157
  163. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_output_anchor_proxy.py +0 -97
  164. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_plugin_driver.py +0 -63
  165. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_plugin_proxy.py +0 -363
  166. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_provider.py +0 -71
  167. build/lib/another_ayx_python_sdk/providers/e1_provider/e1_record_packet.py +0 -21
  168. build/lib/another_ayx_python_sdk/providers/e1_provider/events.py +0 -36
  169. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/__init__.py +0 -37
  170. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/alteryx_engine.py +0 -105
  171. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/constants.py +0 -50
  172. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/field.py +0 -122
  173. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/output_anchor.py +0 -55
  174. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/output_anchor_manager.py +0 -31
  175. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_copier.py +0 -65
  176. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_creator.py +0 -41
  177. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_info.py +0 -134
  178. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/record_ref.py +0 -42
  179. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/tool.py +0 -29
  180. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/AlteryxPythonSDK/tool_execution_info.py +0 -43
  181. build/lib/another_ayx_python_sdk/providers/e1_provider/mock_e1_sdk/__init__.py +0 -14
  182. build/lib/another_ayx_python_sdk/providers/e1_provider/proxies/__init__.py +0 -18
  183. build/lib/another_ayx_python_sdk/providers/e1_provider/proxies/field_proxy.py +0 -109
  184. build/lib/another_ayx_python_sdk/providers/e1_provider/proxies/record_copier_proxy.py +0 -49
  185. build/lib/another_ayx_python_sdk/providers/e1_provider/records/__init__.py +0 -23
  186. build/lib/another_ayx_python_sdk/providers/e1_provider/records/base_record_container.py +0 -47
  187. build/lib/another_ayx_python_sdk/providers/e1_provider/records/parsed_record_container.py +0 -67
  188. build/lib/another_ayx_python_sdk/providers/e1_provider/records/raw_record_container.py +0 -111
  189. build/lib/another_ayx_python_sdk/providers/e1_provider/tool_config_loader.py +0 -132
  190. build/lib/another_ayx_python_sdk/providers/e1_provider/utilities/__init__.py +0 -35
  191. build/lib/another_ayx_python_sdk/providers/e1_provider/utilities/utilities.py +0 -54
  192. build/lib/another_ayx_python_sdk/providers/e1_provider/workflow_config.py +0 -31
  193. build/lib/another_ayx_python_sdk/providers/file_provider/__init__.py +0 -32
  194. build/lib/another_ayx_python_sdk/providers/file_provider/environment.py +0 -131
  195. build/lib/another_ayx_python_sdk/providers/file_provider/file_adapter.py +0 -286
  196. build/lib/another_ayx_python_sdk/providers/file_provider/file_provider.py +0 -185
  197. build/lib/another_ayx_python_sdk/providers/file_provider/file_provider_dcm.py +0 -53
  198. build/lib/another_ayx_python_sdk/providers/file_provider/file_provider_input_anchor.py +0 -70
  199. build/lib/another_ayx_python_sdk/providers/file_provider/file_provider_input_connection.py +0 -112
  200. build/lib/another_ayx_python_sdk/providers/file_provider/file_provider_output_anchor.py +0 -114
  201. build/lib/another_ayx_python_sdk/providers/file_provider/file_record_packet.py +0 -21
  202. build/lib/another_ayx_python_sdk/providers/file_provider/iox.py +0 -56
  203. build/lib/another_ayx_python_sdk/providers/file_provider/tool_input.py +0 -104
  204. build/lib/another_ayx_python_sdk/test_harness/__init__.py +0 -14
  205. build/lib/another_ayx_python_sdk/test_harness/__main__.py +0 -120
  206. build/lib/another_ayx_python_sdk/test_harness/plugin_runner.py +0 -416
  207. build/lib/another_ayx_python_sdk/test_harness/process_lifecycle_manager.py +0 -80
  208. build/lib/another_ayx_python_sdk/test_harness/sdk_engine_service.py +0 -106
  209. build/lib/another_ayx_python_sdk/version.py +0 -8
  210. {another_ayx_python_sdk-2.4.24.dist-info → another_ayx_python_sdk-2.4.25.dist-info}/WHEEL +0 -0
  211. {another_ayx_python_sdk-2.4.24.dist-info → another_ayx_python_sdk-2.4.25.dist-info}/entry_points.txt +0 -0
  212. {another_ayx_python_sdk-2.4.24.dist-info → another_ayx_python_sdk-2.4.25.dist-info}/licenses/LICENSE +0 -0
@@ -1,58 +0,0 @@
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
- """AMP Provider: Proxy class for DCM API."""
15
- import datetime as dt
16
- from typing import Dict, Optional
17
-
18
- from another_ayx_python_sdk.core import DcmBase
19
- from another_ayx_python_sdk.core.doc_utilities import inherit_docs
20
- from another_ayx_python_sdk.providers.amp_provider.repositories import DCMRepository
21
-
22
-
23
- @inherit_docs
24
- class AMPDCM(DcmBase):
25
- """Class that wraps DCM API work."""
26
-
27
- def get_connection(self, connection_id: str) -> Dict: # noqa: D102
28
- return DCMRepository().get_connection(connection_id)
29
-
30
- def get_write_lock(
31
- self,
32
- connection_id: str,
33
- role: str,
34
- secret_type: str,
35
- expires_in: Optional[dt.datetime],
36
- ) -> Dict: # noqa: D102
37
- return DCMRepository().get_write_lock(
38
- connection_id, role, secret_type, expires_in
39
- )
40
-
41
- def free_write_lock(
42
- self, connection_id: str, role: str, secret_type: str, lock_id: str
43
- ) -> None: # noqa: D102
44
- DCMRepository().free_write_lock(connection_id, role, secret_type, lock_id)
45
-
46
- def update_connection_secret(
47
- self,
48
- connection_id: str,
49
- lock_id: str,
50
- role: str,
51
- secret_type: str,
52
- value: str,
53
- expires_on: Optional[dt.datetime],
54
- parameters: Optional[Dict[str, str]],
55
- ) -> Dict: # noqa: D102
56
- return DCMRepository().update_connection_secret(
57
- connection_id, lock_id, role, secret_type, value, expires_on, parameters
58
- )
@@ -1,358 +0,0 @@
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
- """AMP Driver class definition."""
15
- import asyncio
16
- import logging
17
- import traceback
18
- from typing import Any, Callable, NamedTuple, Optional, TYPE_CHECKING
19
-
20
- from another_ayx_python_sdk.core import PluginV2
21
- from another_ayx_python_sdk.core.exceptions import WorkflowRuntimeError
22
- from another_ayx_python_sdk.core.input_connection_base import InputConnectionStatus
23
- from another_ayx_python_sdk.providers.amp_provider.amp_io_components import (
24
- ControlIOBuffer,
25
- StreamIOBuffer,
26
- )
27
- from another_ayx_python_sdk.providers.amp_provider.amp_provider_v2 import AMPProviderV2
28
- from another_ayx_python_sdk.providers.amp_provider.logger_config import get_plugin_logger
29
- from another_ayx_python_sdk.providers.amp_provider.repositories import (
30
- InputRecordPacketRepository,
31
- Singleton,
32
- )
33
- from another_ayx_python_sdk.providers.amp_provider.repositories.input_record_packet_repository import (
34
- EmptyRecordPacketRepositoryException,
35
- InputConnectionRepository,
36
- UnfinishedRecordPacketException,
37
- )
38
-
39
-
40
- if TYPE_CHECKING:
41
- from another_ayx_python_sdk.providers.amp_provider.resources.generated.sdk_tool_service_v2_pb2 import (
42
- ControlIn,
43
- )
44
- from another_ayx_python_sdk.providers.amp_provider.amp_environment_v2 import (
45
- AMPEnvironmentV2,
46
- )
47
- import pyarrow as pa
48
-
49
- logger = logging.getLogger(__name__)
50
-
51
-
52
- class AMPDriver(metaclass=Singleton):
53
- """The AMP Driver is a class that manages the lifecycle methods of a plugin instance."""
54
-
55
- def __init__(self) -> None:
56
- self.__plugin: Optional["PluginV2"] = None
57
- self.anchors: dict = {"incoming": {}, "outgoing": {}}
58
- self.provider: AMPProviderV2 = AMPProviderV2()
59
- self._plugin_class: Optional[Callable] = None
60
- self.event_plugin_complete = asyncio.Event()
61
- self.event_notify_on_complete = asyncio.Event()
62
-
63
- def _handle_all_errors(self, exception: Exception) -> None:
64
- traceback_list = traceback.format_tb(exception.__traceback__)
65
- traceback_string = "".join(["\n"] + traceback_list[1:])
66
- amp_logger = self.provider.logger
67
- amp_logger.exception(traceback_string)
68
-
69
- def _run_with_error_handling(self, _callable: Callable, *args: Any) -> None:
70
- try:
71
- _callable(*args)
72
- except (Exception, WorkflowRuntimeError) as e:
73
- self.provider.io.error(f"{type(e)}: {e}")
74
- self._handle_all_errors(e)
75
-
76
- def run_user_init(self) -> None:
77
- """Allow running plugin's init in a non-blocking executor."""
78
- try:
79
- self.plugin = self._plugin_class(self.provider) # type: ignore
80
- except Exception as e:
81
- self.ctrl_io.error(f"Could not init plugin {repr(e)}")
82
- logger.info("Loaded and init user plugin")
83
-
84
- async def _initialize_plugin(
85
- self,
86
- _init_data: "ControlIn",
87
- ready_for_records: asyncio.Event,
88
- record_batch_received: asyncio.Event,
89
- ) -> bool:
90
- logger.debug("Starting plugin init")
91
- # Wait until client sends the init data, ctrl_read will set it then
92
- request = _init_data
93
- self.provider.set_anchors(request)
94
- self.provider.environment.set_tool_config(
95
- request.plugin_initialization_data.configXml
96
- )
97
- self.provider.environment.save_engine_constants(
98
- dict(request.plugin_initialization_data.engineConstants)
99
- )
100
- logger.debug("AMP CONSTANTS:")
101
- logger.debug(f"Designer Version: {self.provider.environment.designer_version}")
102
- logger.debug(
103
- f"Alteryx Install Directory: {self.provider.environment.alteryx_install_dir}"
104
- )
105
- logger.debug(f"Workflow Directory: {self.provider.environment.workflow_dir}")
106
- logger.debug(f"Temp Directory: {self.provider.environment.temp_dir}")
107
- logger.debug(f"Tool ID: {self.provider.environment.tool_id}")
108
- logger.debug(f"Workflow ID: {self.provider.environment.workflow_id}")
109
- logger.debug(f"Raw Constants: {self.provider.environment.raw_constants}")
110
- self.provider.environment.save_update_mode(
111
- request.plugin_initialization_data.updateMode
112
- )
113
-
114
- # TODO: Check and see if we actually need these - we already set anchors upstream
115
- for anchor in request.plugin_initialization_data.incomingAnchors:
116
- self.anchors["incoming"][anchor.name] = anchor
117
- for anchor in request.plugin_initialization_data.outgoingAnchors:
118
- self.anchors["outgoing"][anchor.name] = anchor
119
- try:
120
- if self._plugin_class:
121
- log_handle = (
122
- f"{self._plugin_class.__name__}.{self.provider.environment.tool_id}"
123
- )
124
- logger.debug("Creating log file %s\n", log_handle)
125
- self.provider.logger = get_plugin_logger(
126
- log_handle, self.provider.environment.get_log_directory()
127
- )
128
- except Exception as e:
129
- err_str = """
130
- Could not dynamically create named plugin logger! \n
131
- %s
132
- If you are using custom logging and seeing this error, setting
133
- your plugin logger during the plugin's __init__ may resolve this warning.
134
- """
135
- logger.warn(err_str, repr(e))
136
- try:
137
- init_plugin_event = self.ctrl_io.push_driver_callback(self.run_user_init)
138
- await init_plugin_event.wait()
139
- ready_for_records.set()
140
- if (
141
- len(self.anchors["incoming"]) == 0
142
- or self.provider.environment.update_only
143
- ):
144
- logger.debug("tool has no input anchors")
145
- logger.debug("setting record_batch_received signal")
146
- record_batch_received.set()
147
- logger.debug(
148
- "done waiting for plugin init, signal RecordTransfer stream is ready to process record batches..."
149
- )
150
- self.ctrl_io.info("Plugin class successfully loaded.")
151
- except Exception as e:
152
- logger.error("Exception placing plugin init on action queue: %s", repr(e))
153
- return False
154
-
155
- # We can't guarantee this is initialized until after this. But,
156
- # TracerBullet code suggests translate_msg should be callable in __init__
157
- # for a plugin
158
- return True
159
-
160
- def metadata_received(self, anchor_name: str, connection_name: str) -> None:
161
- """
162
- Retrieve the input connection, and call plugin's on_input_connection_initialized method.
163
-
164
- Parameters
165
- ----------
166
- anchor_name: str
167
- The name of the input anchor associated with the connection to be initialized.
168
-
169
- connection_name: str
170
- The name of the input connection to be retrieved.
171
- """
172
- connection = InputConnectionRepository().get_connection(
173
- anchor_name, connection_name
174
- )
175
-
176
- InputConnectionRepository().save_connection_status(
177
- anchor_name, connection_name, InputConnectionStatus.INITIALIZED
178
- )
179
- logger.debug("Connection %s on %s initialized", connection_name, anchor_name)
180
- self._run_with_error_handling(
181
- self.plugin.on_input_connection_opened, connection
182
- )
183
-
184
- def record_packet_received(self, anchor_name: str, connection_name: str) -> None:
185
- """
186
- Retrieve input connection, and call plugin's on_record_packet method.
187
-
188
- Parameters
189
- ----------
190
- anchor_name: str
191
- The name of the input anchor associated with the connection to be read from.
192
-
193
- connection_name: str
194
- The name of the input connection to be retrieved.
195
- """
196
- connection = InputConnectionRepository().get_connection(
197
- anchor_name, connection_name
198
- )
199
- InputConnectionRepository().save_connection_status(
200
- anchor_name, connection_name, InputConnectionStatus.RECEIVING_RECORDS
201
- )
202
- logger.debug(
203
- "Connection %s on anchor %s receiving records", connection_name, anchor_name
204
- )
205
- while True:
206
- try:
207
- InputRecordPacketRepository().peek_record_packet(
208
- anchor_name, connection_name
209
- )
210
- except (
211
- UnfinishedRecordPacketException,
212
- EmptyRecordPacketRepositoryException,
213
- ):
214
- break
215
- else:
216
- logger.debug(
217
- "Sending record packet to connection %s on anchor %s",
218
- connection_name,
219
- anchor_name,
220
- )
221
- self._run_with_error_handling(self.plugin.on_record_packet, connection)
222
- InputRecordPacketRepository().pop_record_packet(
223
- anchor_name, connection_name
224
- )
225
-
226
- def incoming_connection_complete_callback(self, anchor: NamedTuple) -> None:
227
- """
228
- Will call when an incoming connection is done sending RecordBatches.
229
-
230
- Parameters
231
- ----------
232
- anchor_name: The name of the anchor.
233
- connection_name: The name of the connection.
234
- """
235
- self._run_with_error_handling(
236
- self.plugin.on_incoming_connection_complete, anchor
237
- )
238
-
239
- def record_batch_received(self, record_msg: "pa.Table", anchor: NamedTuple) -> None:
240
- """
241
- Handle received batch and call plugin's on_record_batch if a full record is ready.
242
-
243
- Parameters
244
- ----------
245
- record_msg: An IncomingRecords message
246
- """
247
- logger.debug("Calling plugin's on_record_batch")
248
- self._run_with_error_handling(self.plugin.on_record_batch, record_msg, anchor)
249
-
250
- def connection_closed_callback(
251
- self, anchor_name: str, connection_name: str
252
- ) -> None:
253
- """
254
- Close individual connections.
255
-
256
- Parameters
257
- ----------
258
- anchor_name: str
259
- The name of the input anchor associated with the connection to be closed.
260
-
261
- connection_name: str
262
- The name of the input connection to be closed.
263
- """
264
- InputConnectionRepository().save_connection_status(
265
- anchor_name, connection_name, InputConnectionStatus.CLOSED
266
- )
267
- logger.debug("Closed connection %s on anchor %s", connection_name, anchor_name)
268
- try:
269
- InputRecordPacketRepository().peek_record_packet(
270
- anchor_name, connection_name
271
- )
272
- except EmptyRecordPacketRepositoryException:
273
- pass
274
- except ValueError:
275
- logger.debug(
276
- "%s was not found in the InputRecordPacketRepository. (There were no records associated with this anchor.)",
277
- anchor_name,
278
- )
279
- else:
280
- self._run_with_error_handling(
281
- self.plugin.on_record_packet,
282
- InputConnectionRepository().get_connection(
283
- anchor_name, connection_name
284
- ),
285
- )
286
-
287
- def on_complete_callback(self) -> None:
288
- """Call plugin's on_complete method."""
289
- logger.debug("Running plugin's on_complete")
290
- self._run_with_error_handling(self.plugin.on_complete)
291
- logger.debug("Plugin complete, closing")
292
-
293
- @property
294
- def plugin(self) -> "PluginV2":
295
- """
296
- Get the plugin associated with this driver.
297
-
298
- Returns
299
- -------
300
- Plugin
301
- The plugin associated with this AMP Driver instance.
302
-
303
- Raises
304
- ------
305
- ValueError
306
- If the plugin hasn't been assigned.
307
- """
308
- if self.__plugin is None:
309
- raise ValueError("Plugin cannot be None")
310
-
311
- return self.__plugin
312
-
313
- @plugin.setter
314
- def plugin(self, value: "PluginV2") -> None:
315
- """
316
- Set the plugin associated with this driver.
317
-
318
- Parameters
319
- ----------
320
- value: Plugin
321
- The plugin to be assigned.
322
-
323
- """
324
- self.__plugin = value
325
- logger.debug("Assigned plugin %s", value)
326
-
327
- """
328
- These properties are aiming to improve readability/show intent and avoid
329
- confusing 'pass by object' behaviour. We can remove if others don't agree.
330
- If we haven't loaded the user's plugin class yet, we'll return what will
331
- eventually be passed. Once we've passed the provider obj to the plugin,
332
- we'll, semantically at least, then pass over ownership.
333
- """
334
-
335
- @property
336
- def ctrl_io(self) -> "ControlIOBuffer":
337
- """Get the plugin provider's io buffer, convenience property."""
338
- if self.__plugin is None:
339
- return self.provider.io
340
- return self.__plugin.provider.io
341
-
342
- @property
343
- def record_io(self) -> "StreamIOBuffer":
344
- """Get plugin providers record buffer, convenience property."""
345
- if self.__plugin is None:
346
- return self.provider.record_io
347
- return self.__plugin.provider.record_io
348
-
349
- @property
350
- def environment(self) -> "AMPEnvironmentV2":
351
- """Get plugin provider's environment."""
352
- if self.__plugin is None:
353
- self.provider.environment
354
- return self.__plugin.provider.environment # type: ignore
355
-
356
- def clear_state(self) -> None:
357
- """Reset the AMP Driver."""
358
- self.__plugin = None
@@ -1,73 +0,0 @@
1
- # Copyright (C) 2022 Alteryx, Inc. All rights reserved.
2
- #
3
- # Licensed under the ALTERYX SDK AND API LICENSE AGREEMENT;
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.alteryx.com/alteryx-sdk-and-api-license-agreement
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- """Proxy Class for managing the SDK environment on Alteryx Multi-threaded Processing (AMP)."""
15
- from typing import TYPE_CHECKING
16
-
17
- from another_ayx_python_sdk.core.doc_utilities import inherit_docs
18
- from another_ayx_python_sdk.core.environment_base import EnvironmentBase
19
- from another_ayx_python_sdk.providers.amp_provider.repositories import EnvironmentRepository
20
-
21
- if TYPE_CHECKING:
22
- from another_ayx_python_sdk.core.environment_base import UpdateMode, Locale
23
- from pathlib import Path
24
-
25
-
26
- @inherit_docs
27
- class AMPEnvironment(EnvironmentBase):
28
- """Variables that describe the Designer environment when AMP is enabled."""
29
-
30
- @property
31
- def update_only(self) -> bool: # noqa: D102
32
- return EnvironmentRepository().get_update_only()
33
-
34
- @property
35
- def update_mode(self) -> "UpdateMode": # noqa: D102
36
- return EnvironmentRepository().get_update_mode()
37
-
38
- @property
39
- def designer_version(self) -> str: # noqa: D102
40
- return EnvironmentRepository().get_designer_version()
41
-
42
- @property
43
- def workflow_dir(self) -> "Path": # noqa: D102
44
- return EnvironmentRepository().get_workflow_dir()
45
-
46
- @property
47
- def alteryx_install_dir(self) -> "Path": # noqa: D102
48
- return EnvironmentRepository().get_alteryx_install_dir()
49
-
50
- @property
51
- def alteryx_locale(self) -> "Locale": # noqa: D102
52
- return EnvironmentRepository().get_alteryx_locale()
53
-
54
- @property
55
- def tool_id(self) -> int: # noqa: D102
56
- return EnvironmentRepository().get_tool_id()
57
-
58
- @property
59
- def proxy_configuration(self) -> dict: # noqa: D102
60
- return EnvironmentRepository().get_proxy_configuration()
61
-
62
- def parse_settings_key_value(
63
- self, settings_str: str, line_delimiter: str = "\n", key_delimiter: str = "="
64
- ) -> dict: # noqa: D102
65
- return super().parse_settings_key_value(
66
- settings_str, line_delimiter=line_delimiter, key_delimiter=key_delimiter
67
- )
68
-
69
- def get_settings_conf(self, *args: list) -> dict: # noqa: D102
70
- return super().get_settings_conf(*args)
71
-
72
- def update_tool_config(self, new_config: dict) -> None: # noqa: D102
73
- EnvironmentRepository().save_tool_config(new_config)