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