airbyte-cdk 0.30.4__tar.gz → 0.31.1__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (270) hide show
  1. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/PKG-INFO +1 -1
  2. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1/airbyte_cdk}/connector_builder/connector_builder_handler.py +9 -10
  3. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1/airbyte_cdk}/connector_builder/main.py +1 -1
  4. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1/airbyte_cdk}/connector_builder/message_grouper.py +63 -27
  5. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1/airbyte_cdk}/connector_builder/models.py +7 -1
  6. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk.egg-info/PKG-INFO +1 -1
  7. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk.egg-info/SOURCES.txt +5 -5
  8. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk.egg-info/top_level.txt +0 -1
  9. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/setup.py +1 -1
  10. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/connector_builder/test_connector_builder_handler.py +33 -13
  11. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/connector_builder/test_message_grouper.py +45 -23
  12. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/LICENSE.txt +0 -0
  13. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/README.md +0 -0
  14. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/__init__.py +0 -0
  15. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/config_observation.py +0 -0
  16. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/connector.py +0 -0
  17. {airbyte-cdk-0.30.4/airbyte_cdk/sources/streams/utils → airbyte-cdk-0.31.1/airbyte_cdk/connector_builder}/__init__.py +0 -0
  18. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/destinations/__init__.py +0 -0
  19. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/destinations/destination.py +0 -0
  20. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/entrypoint.py +0 -0
  21. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/exception_handler.py +0 -0
  22. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/logger.py +0 -0
  23. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/models/__init__.py +0 -0
  24. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/models/airbyte_protocol.py +0 -0
  25. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/models/well_known_types.py +0 -0
  26. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/py.typed +0 -0
  27. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/__init__.py +0 -0
  28. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/abstract_source.py +0 -0
  29. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/config.py +0 -0
  30. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/connector_state_manager.py +0 -0
  31. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/__init__.py +0 -0
  32. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/auth/__init__.py +0 -0
  33. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/auth/declarative_authenticator.py +0 -0
  34. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/auth/oauth.py +0 -0
  35. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/auth/token.py +0 -0
  36. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/checks/__init__.py +0 -0
  37. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/checks/check_stream.py +0 -0
  38. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/checks/connection_checker.py +0 -0
  39. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/create_partial.py +0 -0
  40. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/datetime/__init__.py +0 -0
  41. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/datetime/datetime_parser.py +0 -0
  42. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/datetime/min_max_datetime.py +0 -0
  43. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/declarative_component_schema.yaml +0 -0
  44. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/declarative_source.py +0 -0
  45. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/declarative_stream.py +0 -0
  46. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/decoders/__init__.py +0 -0
  47. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/decoders/decoder.py +0 -0
  48. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/decoders/json_decoder.py +0 -0
  49. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/exceptions.py +0 -0
  50. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/extractors/__init__.py +0 -0
  51. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/extractors/dpath_extractor.py +0 -0
  52. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/extractors/http_selector.py +0 -0
  53. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/extractors/record_extractor.py +0 -0
  54. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/extractors/record_filter.py +0 -0
  55. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/extractors/record_selector.py +0 -0
  56. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/incremental/__init__.py +0 -0
  57. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/incremental/datetime_based_cursor.py +0 -0
  58. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/interpolation/__init__.py +0 -0
  59. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/interpolation/filters.py +0 -0
  60. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/interpolation/interpolated_boolean.py +0 -0
  61. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/interpolation/interpolated_mapping.py +0 -0
  62. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/interpolation/interpolated_string.py +0 -0
  63. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/interpolation/interpolation.py +0 -0
  64. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/interpolation/jinja.py +0 -0
  65. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/interpolation/macros.py +0 -0
  66. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/manifest_declarative_source.py +0 -0
  67. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/models/__init__.py +0 -0
  68. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/models/declarative_component_schema.py +0 -0
  69. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/parsers/__init__.py +0 -0
  70. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/parsers/class_types_registry.py +0 -0
  71. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/parsers/custom_exceptions.py +0 -0
  72. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/parsers/default_implementation_registry.py +0 -0
  73. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py +0 -0
  74. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/parsers/manifest_reference_resolver.py +0 -0
  75. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +0 -0
  76. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/partition_routers/__init__.py +0 -0
  77. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/partition_routers/list_partition_router.py +0 -0
  78. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/partition_routers/single_partition_router.py +0 -0
  79. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/partition_routers/substream_partition_router.py +0 -0
  80. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/__init__.py +0 -0
  81. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/__init__.py +0 -0
  82. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/__init__.py +0 -0
  83. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/constant_backoff_strategy.py +0 -0
  84. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/exponential_backoff_strategy.py +0 -0
  85. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/header_helper.py +0 -0
  86. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/wait_time_from_header_backoff_strategy.py +0 -0
  87. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/wait_until_time_from_header_backoff_strategy.py +0 -0
  88. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategy.py +0 -0
  89. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/composite_error_handler.py +0 -0
  90. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/default_error_handler.py +0 -0
  91. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/error_handler.py +0 -0
  92. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/http_response_filter.py +0 -0
  93. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/response_action.py +0 -0
  94. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/response_status.py +0 -0
  95. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/http_requester.py +0 -0
  96. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/__init__.py +0 -0
  97. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/default_paginator.py +0 -0
  98. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/no_pagination.py +0 -0
  99. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/paginator.py +0 -0
  100. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/__init__.py +0 -0
  101. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/cursor_pagination_strategy.py +0 -0
  102. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/offset_increment.py +0 -0
  103. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/page_increment.py +0 -0
  104. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/pagination_strategy.py +0 -0
  105. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/request_option.py +0 -0
  106. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/request_options/__init__.py +0 -0
  107. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/request_options/interpolated_request_input_provider.py +0 -0
  108. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/request_options/interpolated_request_options_provider.py +0 -0
  109. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/request_options/request_options_provider.py +0 -0
  110. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/request_path.py +0 -0
  111. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/requester.py +0 -0
  112. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/retrievers/__init__.py +0 -0
  113. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/retrievers/retriever.py +0 -0
  114. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py +0 -0
  115. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/schema/__init__.py +0 -0
  116. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/schema/default_schema_loader.py +0 -0
  117. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/schema/inline_schema_loader.py +0 -0
  118. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/schema/json_file_schema_loader.py +0 -0
  119. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/schema/schema_loader.py +0 -0
  120. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/spec/__init__.py +0 -0
  121. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/spec/spec.py +0 -0
  122. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/stream_slicers/__init__.py +0 -0
  123. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/stream_slicers/cartesian_product_stream_slicer.py +0 -0
  124. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/stream_slicers/stream_slicer.py +0 -0
  125. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/transformations/__init__.py +0 -0
  126. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/transformations/add_fields.py +0 -0
  127. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/transformations/remove_fields.py +0 -0
  128. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/transformations/transformation.py +0 -0
  129. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/types.py +0 -0
  130. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/yaml_declarative_source.py +0 -0
  131. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/deprecated/__init__.py +0 -0
  132. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/deprecated/base_source.py +0 -0
  133. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/deprecated/client.py +0 -0
  134. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/singer/__init__.py +0 -0
  135. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/singer/singer_helpers.py +0 -0
  136. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/singer/source.py +0 -0
  137. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/source.py +0 -0
  138. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/__init__.py +0 -0
  139. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/availability_strategy.py +0 -0
  140. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/core.py +0 -0
  141. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/__init__.py +0 -0
  142. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/auth/__init__.py +0 -0
  143. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/auth/core.py +0 -0
  144. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/auth/oauth.py +0 -0
  145. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/auth/token.py +0 -0
  146. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/availability_strategy.py +0 -0
  147. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/exceptions.py +0 -0
  148. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/http.py +0 -0
  149. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/rate_limiting.py +0 -0
  150. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/requests_native_auth/__init__.py +0 -0
  151. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/requests_native_auth/abstract_oauth.py +0 -0
  152. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/requests_native_auth/abstract_token.py +0 -0
  153. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/requests_native_auth/oauth.py +0 -0
  154. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/requests_native_auth/token.py +0 -0
  155. {airbyte-cdk-0.30.4/connector_builder → airbyte-cdk-0.31.1/airbyte_cdk/sources/streams/utils}/__init__.py +0 -0
  156. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/utils/stream_helper.py +0 -0
  157. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/utils/__init__.py +0 -0
  158. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/utils/casing.py +0 -0
  159. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/utils/catalog_helpers.py +0 -0
  160. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/utils/record_helper.py +0 -0
  161. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/utils/schema_helpers.py +0 -0
  162. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/utils/schema_models.py +0 -0
  163. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/utils/transform.py +0 -0
  164. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/utils/__init__.py +0 -0
  165. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/utils/airbyte_secrets_utils.py +0 -0
  166. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/utils/event_timing.py +0 -0
  167. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/utils/schema_inferrer.py +0 -0
  168. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk/utils/traced_exception.py +0 -0
  169. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk.egg-info/dependency_links.txt +0 -0
  170. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/airbyte_cdk.egg-info/requires.txt +0 -0
  171. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/pyproject.toml +0 -0
  172. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/setup.cfg +0 -0
  173. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/source_declarative_manifest/__init__.py +0 -0
  174. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/source_declarative_manifest/main.py +0 -0
  175. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/connector_builder/__init__.py +0 -0
  176. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/connector_builder/utils.py +0 -0
  177. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/destinations/__init__.py +0 -0
  178. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/destinations/test_destination.py +0 -0
  179. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/singer/__init__.py +0 -0
  180. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/singer/test_singer_helpers.py +0 -0
  181. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/singer/test_singer_source.py +0 -0
  182. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/__init__.py +0 -0
  183. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/__init__.py +0 -0
  184. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/auth/__init__.py +0 -0
  185. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/auth/test_oauth.py +0 -0
  186. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/auth/test_session_token_auth.py +0 -0
  187. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/auth/test_token_auth.py +0 -0
  188. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/checks/__init__.py +0 -0
  189. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/checks/test_check_stream.py +0 -0
  190. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/decoders/__init__.py +0 -0
  191. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/decoders/test_json_decoder.py +0 -0
  192. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/external_component.py +0 -0
  193. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/extractors/__init__.py +0 -0
  194. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/extractors/test_dpath_extractor.py +0 -0
  195. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/extractors/test_record_filter.py +0 -0
  196. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/extractors/test_record_selector.py +0 -0
  197. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/incremental/__init__.py +0 -0
  198. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/incremental/test_datetime_based_cursor.py +0 -0
  199. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/interpolation/__init__.py +0 -0
  200. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/interpolation/test_filters.py +0 -0
  201. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/interpolation/test_interpolated_boolean.py +0 -0
  202. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/interpolation/test_interpolated_mapping.py +0 -0
  203. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/interpolation/test_interpolated_string.py +0 -0
  204. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/interpolation/test_jinja.py +0 -0
  205. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/interpolation/test_macros.py +0 -0
  206. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/parsers/__init__.py +0 -0
  207. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/parsers/test_manifest_component_transformer.py +0 -0
  208. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/parsers/test_manifest_reference_resolver.py +0 -0
  209. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/parsers/test_model_to_component_factory.py +0 -0
  210. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/parsers/testing_components.py +0 -0
  211. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/partition_routers/__init__.py +0 -0
  212. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/partition_routers/test_list_partition_router.py +0 -0
  213. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/partition_routers/test_single_partition_router.py +0 -0
  214. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/partition_routers/test_substream_partition_router.py +0 -0
  215. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/__init__.py +0 -0
  216. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/__init__.py +0 -0
  217. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/__init__.py +0 -0
  218. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_constant_backoff.py +0 -0
  219. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_exponential_backoff.py +0 -0
  220. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_header_helper.py +0 -0
  221. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_wait_time_from_header.py +0 -0
  222. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_wait_until_time_from_header.py +0 -0
  223. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/test_composite_error_handler.py +0 -0
  224. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/test_default_error_handler.py +0 -0
  225. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/test_http_response_filter.py +0 -0
  226. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/test_response_status.py +0 -0
  227. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/paginators/__init__.py +0 -0
  228. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/paginators/test_cursor_pagination_strategy.py +0 -0
  229. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/paginators/test_default_paginator.py +0 -0
  230. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/paginators/test_no_paginator.py +0 -0
  231. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/paginators/test_offset_increment.py +0 -0
  232. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/paginators/test_page_increment.py +0 -0
  233. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/paginators/test_request_option.py +0 -0
  234. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/request_options/__init__.py +0 -0
  235. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/request_options/test_interpolated_request_options_provider.py +0 -0
  236. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/test_http_requester.py +0 -0
  237. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/test_interpolated_request_input_provider.py +0 -0
  238. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/retrievers/__init__.py +0 -0
  239. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/retrievers/test_simple_retriever.py +0 -0
  240. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/schema/__init__.py +0 -0
  241. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/schema/source_test/SourceTest.py +0 -0
  242. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/schema/source_test/__init__.py +0 -0
  243. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/schema/test_default_schema_loader.py +0 -0
  244. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/schema/test_inline_schema_loader.py +0 -0
  245. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/schema/test_json_file_schema_loader.py +0 -0
  246. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/states/__init__.py +0 -0
  247. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/stream_slicers/__init__.py +0 -0
  248. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/stream_slicers/test_cartesian_product_stream_slicer.py +0 -0
  249. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/test_create_partial.py +0 -0
  250. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/test_declarative_stream.py +0 -0
  251. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/test_manifest_declarative_source.py +0 -0
  252. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/test_yaml_declarative_source.py +0 -0
  253. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/__init__.py +0 -0
  254. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/http/__init__.py +0 -0
  255. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/http/auth/__init__.py +0 -0
  256. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/http/auth/test_auth.py +0 -0
  257. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/http/requests_native_auth/__init__.py +0 -0
  258. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/http/requests_native_auth/test_requests_native_auth.py +0 -0
  259. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/http/test_availability_strategy.py +0 -0
  260. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/http/test_http.py +0 -0
  261. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/test_availability_strategy.py +0 -0
  262. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/test_streams_core.py +0 -0
  263. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/test_abstract_source.py +0 -0
  264. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/test_config.py +0 -0
  265. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/test_connector_state_manager.py +0 -0
  266. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/sources/test_source.py +0 -0
  267. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/utils/__init__.py +0 -0
  268. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/utils/test_schema_inferrer.py +0 -0
  269. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/utils/test_secret_utils.py +0 -0
  270. {airbyte-cdk-0.30.4 → airbyte-cdk-0.31.1}/unit_tests/utils/test_traced_exception.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-cdk
3
- Version: 0.30.4
3
+ Version: 0.31.1
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  Home-page: https://github.com/airbytehq/airbyte
6
6
  Author: Airbyte
@@ -7,6 +7,7 @@ from datetime import datetime
7
7
  from typing import Any, Dict, List, Mapping
8
8
  from urllib.parse import urljoin
9
9
 
10
+ from airbyte_cdk.connector_builder.message_grouper import MessageGrouper
10
11
  from airbyte_cdk.models import AirbyteMessage, AirbyteRecordMessage, ConfiguredAirbyteCatalog
11
12
  from airbyte_cdk.models import Type
12
13
  from airbyte_cdk.models import Type as MessageType
@@ -15,7 +16,6 @@ from airbyte_cdk.sources.declarative.declarative_stream import DeclarativeStream
15
16
  from airbyte_cdk.sources.declarative.manifest_declarative_source import ManifestDeclarativeSource
16
17
  from airbyte_cdk.sources.streams.http import HttpStream
17
18
  from airbyte_cdk.utils.traced_exception import AirbyteTracedException
18
- from connector_builder.message_grouper import MessageGrouper
19
19
 
20
20
  DEFAULT_MAXIMUM_NUMBER_OF_PAGES_PER_SLICE = 5
21
21
  DEFAULT_MAXIMUM_NUMBER_OF_SLICES = 5
@@ -31,13 +31,14 @@ def read_stream(source: DeclarativeSource, config: Mapping[str, Any], configured
31
31
  handler = MessageGrouper(max_pages_per_slice, max_slices)
32
32
  stream_name = configured_catalog.streams[0].stream.name # The connector builder only supports a single stream
33
33
  stream_read = handler.get_message_groups(source, config, configured_catalog, max_records)
34
- return AirbyteMessage(type=MessageType.RECORD, record=AirbyteRecordMessage(
35
- data=dataclasses.asdict(stream_read),
36
- stream=stream_name,
37
- emitted_at=_emitted_at()
38
- ))
34
+ return AirbyteMessage(
35
+ type=MessageType.RECORD,
36
+ record=AirbyteRecordMessage(data=dataclasses.asdict(stream_read), stream=stream_name, emitted_at=_emitted_at()),
37
+ )
39
38
  except Exception as exc:
40
- error = AirbyteTracedException.from_exception(exc, message=f"Error reading stream with config={config} and catalog={configured_catalog}")
39
+ error = AirbyteTracedException.from_exception(
40
+ exc, message=f"Error reading stream with config={config} and catalog={configured_catalog}"
41
+ )
41
42
  return error.as_airbyte_message()
42
43
 
43
44
 
@@ -85,9 +86,7 @@ def _get_http_streams(source: ManifestDeclarativeSource, config: Dict[str, Any])
85
86
  f"A declarative stream should only have a retriever of type HttpStream, but received: {stream.retriever.__class__}"
86
87
  )
87
88
  else:
88
- raise TypeError(
89
- f"A declarative source should only contain streams of type DeclarativeStream, but received: {stream.__class__}"
90
- )
89
+ raise TypeError(f"A declarative source should only contain streams of type DeclarativeStream, but received: {stream.__class__}")
91
90
  return http_streams
92
91
 
93
92
 
@@ -7,11 +7,11 @@ import sys
7
7
  from typing import Any, List, Mapping, Optional, Tuple
8
8
 
9
9
  from airbyte_cdk.connector import BaseConnector
10
+ from airbyte_cdk.connector_builder.connector_builder_handler import list_streams, read_stream, resolve_manifest
10
11
  from airbyte_cdk.entrypoint import AirbyteEntrypoint
11
12
  from airbyte_cdk.models import ConfiguredAirbyteCatalog
12
13
  from airbyte_cdk.sources.declarative.manifest_declarative_source import ManifestDeclarativeSource
13
14
  from airbyte_cdk.utils.traced_exception import AirbyteTracedException
14
- from connector_builder.connector_builder_handler import list_streams, read_stream, resolve_manifest
15
15
 
16
16
 
17
17
  def create_source(config: Mapping[str, Any]) -> ManifestDeclarativeSource:
@@ -9,11 +9,19 @@ from json import JSONDecodeError
9
9
  from typing import Any, Iterable, Iterator, Mapping, Optional, Union
10
10
  from urllib.parse import parse_qs, urlparse
11
11
 
12
- from airbyte_cdk.models import AirbyteLogMessage, AirbyteMessage, Type
12
+ from airbyte_cdk.connector_builder.models import HttpRequest, HttpResponse, LogMessage, StreamRead, StreamReadPages, StreamReadSlices
13
13
  from airbyte_cdk.sources.declarative.declarative_source import DeclarativeSource
14
+ from airbyte_cdk.utils import AirbyteTracedException
14
15
  from airbyte_cdk.utils.schema_inferrer import SchemaInferrer
15
- from airbyte_protocol.models.airbyte_protocol import ConfiguredAirbyteCatalog
16
- from connector_builder.models import HttpRequest, HttpResponse, StreamRead, StreamReadPages, StreamReadSlices
16
+ from airbyte_protocol.models.airbyte_protocol import (
17
+ AirbyteLogMessage,
18
+ AirbyteMessage,
19
+ AirbyteTraceMessage,
20
+ ConfiguredAirbyteCatalog,
21
+ Level,
22
+ TraceType,
23
+ )
24
+ from airbyte_protocol.models.airbyte_protocol import Type as MessageType
17
25
 
18
26
 
19
27
  class MessageGrouper:
@@ -24,12 +32,13 @@ class MessageGrouper:
24
32
  self._max_slices = max_slices
25
33
  self._max_record_limit = max_record_limit
26
34
 
27
- def get_message_groups(self,
28
- source: DeclarativeSource,
29
- config: Mapping[str, Any],
30
- configured_catalog: ConfiguredAirbyteCatalog,
31
- record_limit: Optional[int] = None,
32
- ) -> StreamRead:
35
+ def get_message_groups(
36
+ self,
37
+ source: DeclarativeSource,
38
+ config: Mapping[str, Any],
39
+ configured_catalog: ConfiguredAirbyteCatalog,
40
+ record_limit: Optional[int] = None,
41
+ ) -> StreamRead:
33
42
  if record_limit is not None and not (1 <= record_limit <= 1000):
34
43
  raise ValueError(f"Record limit must be between 1 and 1000. Got {record_limit}")
35
44
  schema_inferrer = SchemaInferrer()
@@ -41,14 +50,18 @@ class MessageGrouper:
41
50
 
42
51
  slices = []
43
52
  log_messages = []
44
- state = {} # No support for incremental sync
45
53
  for message_group in self._get_message_groups(
46
- source.read(self.logger, config, configured_catalog, state),
54
+ self._read_stream(source, config, configured_catalog),
47
55
  schema_inferrer,
48
56
  record_limit,
49
57
  ):
50
58
  if isinstance(message_group, AirbyteLogMessage):
51
- log_messages.append({"message": message_group.message})
59
+ log_messages.append(LogMessage(**{"message": message_group.message, "level": message_group.level.value}))
60
+ elif isinstance(message_group, AirbyteTraceMessage):
61
+ if message_group.type == TraceType.ERROR:
62
+ error_message = f"{message_group.error.message} - {message_group.error.stack_trace}"
63
+ log_messages.append(LogMessage(**{"message": error_message, "level": "ERROR"}))
64
+
52
65
  else:
53
66
  slices.append(message_group)
54
67
 
@@ -56,12 +69,14 @@ class MessageGrouper:
56
69
  logs=log_messages,
57
70
  slices=slices,
58
71
  test_read_limit_reached=self._has_reached_limit(slices),
59
- inferred_schema=schema_inferrer.get_stream_schema(configured_catalog.streams[0].stream.name) # The connector builder currently only supports reading from a single stream at a time
72
+ inferred_schema=schema_inferrer.get_stream_schema(
73
+ configured_catalog.streams[0].stream.name
74
+ ), # The connector builder currently only supports reading from a single stream at a time
60
75
  )
61
76
 
62
77
  def _get_message_groups(
63
78
  self, messages: Iterator[AirbyteMessage], schema_inferrer: SchemaInferrer, limit: int
64
- ) -> Iterable[Union[StreamReadPages, AirbyteLogMessage]]:
79
+ ) -> Iterable[Union[StreamReadPages, AirbyteLogMessage, AirbyteTraceMessage]]:
65
80
  """
66
81
  Message groups are partitioned according to when request log messages are received. Subsequent response log messages
67
82
  and record messages belong to the prior request log message and when we encounter another request, append the latest
@@ -83,44 +98,56 @@ class MessageGrouper:
83
98
  current_slice_pages = []
84
99
  current_page_request: Optional[HttpRequest] = None
85
100
  current_page_response: Optional[HttpResponse] = None
101
+ had_error = False
86
102
 
87
103
  while records_count < limit and (message := next(messages, None)):
88
104
  if self._need_to_close_page(at_least_one_page_in_group, message):
89
- self._close_page(current_page_request, current_page_response, current_slice_pages, current_page_records)
105
+ self._close_page(current_page_request, current_page_response, current_slice_pages, current_page_records, True)
90
106
  current_page_request = None
91
107
  current_page_response = None
92
108
 
93
- if at_least_one_page_in_group and message.type == Type.LOG and message.log.message.startswith("slice:"):
109
+ if at_least_one_page_in_group and message.type == MessageType.LOG and message.log.message.startswith("slice:"):
94
110
  yield StreamReadSlices(pages=current_slice_pages)
95
111
  current_slice_pages = []
96
112
  at_least_one_page_in_group = False
97
- elif message.type == Type.LOG and message.log.message.startswith("request:"):
113
+ elif message.type == MessageType.LOG and message.log.message.startswith("request:"):
98
114
  if not at_least_one_page_in_group:
99
115
  at_least_one_page_in_group = True
100
116
  current_page_request = self._create_request_from_log_message(message.log)
101
- elif message.type == Type.LOG and message.log.message.startswith("response:"):
117
+ elif message.type == MessageType.LOG and message.log.message.startswith("response:"):
102
118
  current_page_response = self._create_response_from_log_message(message.log)
103
- elif message.type == Type.LOG:
119
+ elif message.type == MessageType.LOG:
120
+ if message.log.level == Level.ERROR:
121
+ had_error = True
104
122
  yield message.log
105
- elif message.type == Type.RECORD:
123
+ elif message.type == MessageType.TRACE:
124
+ if message.trace.type == TraceType.ERROR:
125
+ had_error = True
126
+ yield message.trace
127
+ elif message.type == MessageType.RECORD:
106
128
  current_page_records.append(message.record.data)
107
129
  records_count += 1
108
130
  schema_inferrer.accumulate(message.record)
109
131
  else:
110
- self._close_page(current_page_request, current_page_response, current_slice_pages, current_page_records)
132
+ self._close_page(current_page_request, current_page_response, current_slice_pages, current_page_records, validate_page_complete=not had_error)
111
133
  yield StreamReadSlices(pages=current_slice_pages)
112
134
 
113
135
  @staticmethod
114
- def _need_to_close_page(at_least_one_page_in_group, message):
136
+ def _need_to_close_page(at_least_one_page_in_group, message) -> bool:
115
137
  return (
116
- at_least_one_page_in_group
117
- and message.type == Type.LOG
118
- and (message.log.message.startswith("request:") or message.log.message.startswith("slice:"))
138
+ at_least_one_page_in_group
139
+ and message.type == MessageType.LOG
140
+ and (message.log.message.startswith("request:") or message.log.message.startswith("slice:"))
119
141
  )
120
142
 
121
143
  @staticmethod
122
- def _close_page(current_page_request, current_page_response, current_slice_pages, current_page_records):
123
- if not current_page_request or not current_page_response:
144
+ def _close_page(current_page_request, current_page_response, current_slice_pages, current_page_records, validate_page_complete: bool):
145
+ """
146
+ Close a page when parsing message groups
147
+ @param validate_page_complete: in some cases, we expect the CDK to not return a response. As of today, this will only happen before
148
+ an uncaught exception and therefore, the assumption is that `validate_page_complete=True` only on the last page that is being closed
149
+ """
150
+ if validate_page_complete and (not current_page_request or not current_page_response):
124
151
  raise ValueError("Every message grouping should have at least one request and response")
125
152
 
126
153
  current_slice_pages.append(
@@ -128,6 +155,15 @@ class MessageGrouper:
128
155
  )
129
156
  current_page_records.clear()
130
157
 
158
+ def _read_stream(self, source, config, configured_catalog) -> Iterator[AirbyteMessage]:
159
+ # the generator can raise an exception
160
+ # iterate over the generated messages. if next raise an exception, catch it and yield it as an AirbyteLogMessage
161
+ try:
162
+ yield from source.read(logger=self.logger, config=config, catalog=configured_catalog, state={})
163
+ except Exception as e:
164
+ error_message = f"{e.args[0] if len(e.args) > 0 else str(e)}"
165
+ yield AirbyteTracedException.from_exception(e, message=error_message).as_airbyte_message()
166
+
131
167
  def _create_request_from_log_message(self, log_message: AirbyteLogMessage) -> Optional[HttpRequest]:
132
168
  # TODO: As a temporary stopgap, the CDK emits request data as a log message string. Ideally this should come in the
133
169
  # form of a custom message object defined in the Airbyte protocol, but this unblocks us in the immediate while the
@@ -50,9 +50,15 @@ class StreamReadSlicesInner:
50
50
  state: Optional[Dict[str, Any]]
51
51
 
52
52
 
53
+ @dataclass
54
+ class LogMessage:
55
+ message: str
56
+ level: str
57
+
58
+
53
59
  @dataclass
54
60
  class StreamRead(object):
55
- logs: List[object]
61
+ logs: List[LogMessage]
56
62
  slices: List[StreamReadSlicesInner]
57
63
  test_read_limit_reached: bool
58
64
  inferred_schema: Optional[Dict[str, Any]]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-cdk
3
- Version: 0.30.4
3
+ Version: 0.31.1
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  Home-page: https://github.com/airbytehq/airbyte
6
6
  Author: Airbyte
@@ -14,6 +14,11 @@ airbyte_cdk.egg-info/SOURCES.txt
14
14
  airbyte_cdk.egg-info/dependency_links.txt
15
15
  airbyte_cdk.egg-info/requires.txt
16
16
  airbyte_cdk.egg-info/top_level.txt
17
+ airbyte_cdk/connector_builder/__init__.py
18
+ airbyte_cdk/connector_builder/connector_builder_handler.py
19
+ airbyte_cdk/connector_builder/main.py
20
+ airbyte_cdk/connector_builder/message_grouper.py
21
+ airbyte_cdk/connector_builder/models.py
17
22
  airbyte_cdk/destinations/__init__.py
18
23
  airbyte_cdk/destinations/destination.py
19
24
  airbyte_cdk/models/__init__.py
@@ -161,11 +166,6 @@ airbyte_cdk/utils/airbyte_secrets_utils.py
161
166
  airbyte_cdk/utils/event_timing.py
162
167
  airbyte_cdk/utils/schema_inferrer.py
163
168
  airbyte_cdk/utils/traced_exception.py
164
- connector_builder/__init__.py
165
- connector_builder/connector_builder_handler.py
166
- connector_builder/main.py
167
- connector_builder/message_grouper.py
168
- connector_builder/models.py
169
169
  source_declarative_manifest/__init__.py
170
170
  source_declarative_manifest/main.py
171
171
  unit_tests/connector_builder/__init__.py
@@ -1,4 +1,3 @@
1
1
  airbyte_cdk
2
- connector_builder
3
2
  source_declarative_manifest
4
3
  unit_tests
@@ -17,7 +17,7 @@ setup(
17
17
  name="airbyte-cdk",
18
18
  # The version of the airbyte-cdk package is used at runtime to validate manifests. That validation must be
19
19
  # updated if our semver format changes such as using release candidate versions.
20
- version="0.30.4",
20
+ version="0.31.1",
21
21
  description="A framework for writing Airbyte Connectors.",
22
22
  long_description=README,
23
23
  long_description_content_type="text/markdown",
@@ -3,21 +3,22 @@
3
3
  #
4
4
 
5
5
  import copy
6
+ import dataclasses
6
7
  import json
7
8
  from unittest import mock
8
9
  from unittest.mock import patch
9
10
 
10
- import connector_builder
11
11
  import pytest
12
+ from airbyte_cdk import connector_builder
13
+ from airbyte_cdk.connector_builder.connector_builder_handler import list_streams, resolve_manifest
14
+ from airbyte_cdk.connector_builder.main import handle_connector_builder_request, handle_request, read_stream
15
+ from airbyte_cdk.connector_builder.models import LogMessage, StreamRead, StreamReadSlicesInner, StreamReadSlicesInnerPagesInner
12
16
  from airbyte_cdk.models import AirbyteMessage, AirbyteRecordMessage, ConfiguredAirbyteCatalog
13
17
  from airbyte_cdk.models import Type as MessageType
14
18
  from airbyte_cdk.sources.declarative.declarative_stream import DeclarativeStream
15
19
  from airbyte_cdk.sources.declarative.manifest_declarative_source import ManifestDeclarativeSource
16
20
  from airbyte_cdk.sources.streams.core import Stream
17
21
  from airbyte_cdk.sources.streams.http import HttpStream
18
- from connector_builder.connector_builder_handler import list_streams, resolve_manifest
19
- from connector_builder.main import handle_connector_builder_request, handle_request, read_stream
20
- from connector_builder.models import StreamRead, StreamReadSlicesInner, StreamReadSlicesInnerPagesInner
21
22
  from unit_tests.connector_builder.utils import create_configured_catalog
22
23
 
23
24
  _stream_name = "stream_with_custom_requester"
@@ -215,7 +216,7 @@ def test_resolve_manifest(valid_resolve_manifest_config_file):
215
216
  "primary_key": _stream_primary_key,
216
217
  "url_base": _stream_url_base,
217
218
  "$parameters": _stream_options,
218
- "page_size": 10
219
+ "page_size": 10,
219
220
  },
220
221
  "name": _stream_name,
221
222
  "primary_key": _stream_primary_key,
@@ -315,7 +316,7 @@ def test_read():
315
316
  emitted_at=1,
316
317
  ),
317
318
  )
318
- with patch("connector_builder.message_grouper.MessageGrouper.get_message_groups", return_value=stream_read):
319
+ with patch("airbyte_cdk.connector_builder.message_grouper.MessageGrouper.get_message_groups", return_value=stream_read):
319
320
  output_record = handle_connector_builder_request(
320
321
  source, "test_read", config, ConfiguredAirbyteCatalog.parse_obj(CONFIGURED_CATALOG)
321
322
  )
@@ -323,14 +324,31 @@ def test_read():
323
324
  assert output_record == expected_airbyte_message
324
325
 
325
326
 
326
- def test_read_returns_error_response():
327
+ @patch("traceback.TracebackException.from_exception")
328
+ def test_read_returns_error_response(mock_from_exception):
327
329
  class MockManifestDeclarativeSource:
328
330
  def read(self, logger, config, catalog, state):
329
- raise ValueError
331
+ raise ValueError("error_message")
332
+
333
+ stack_trace = "a stack trace"
334
+ mock_from_exception.return_value = stack_trace
330
335
 
331
336
  source = MockManifestDeclarativeSource()
332
337
  response = read_stream(source, TEST_READ_CONFIG, ConfiguredAirbyteCatalog.parse_obj(CONFIGURED_CATALOG))
333
- assert "Error reading" in response.trace.error.message
338
+
339
+ expected_stream_read = StreamRead(logs=[LogMessage("error_message - a stack trace", "ERROR")],
340
+ slices=[StreamReadSlicesInner(
341
+ pages=[StreamReadSlicesInnerPagesInner(records=[], request=None, response=None)],
342
+ slice_descriptor=None, state=None)],
343
+ test_read_limit_reached=False,
344
+ inferred_schema=None)
345
+
346
+ expected_message = AirbyteMessage(
347
+ type=MessageType.RECORD,
348
+ record=AirbyteRecordMessage(stream=_stream_name, data=dataclasses.asdict(expected_stream_read), emitted_at=1),
349
+ )
350
+ response.record.emitted_at = 1
351
+ assert response == expected_message
334
352
 
335
353
 
336
354
  @pytest.mark.parametrize(
@@ -385,10 +403,12 @@ def test_list_streams(manifest_declarative_source):
385
403
 
386
404
  assert result.type == MessageType.RECORD
387
405
  assert result.record.stream == "list_streams"
388
- assert result.record.data == {"streams": [
389
- {"name": "a name", "url": "https://a-url-base.com/a-path"},
390
- {"name": "another name", "url": "https://another-url-base.com/another-path"}
391
- ]}
406
+ assert result.record.data == {
407
+ "streams": [
408
+ {"name": "a name", "url": "https://a-url-base.com/a-path"},
409
+ {"name": "another name", "url": "https://another-url-base.com/another-path"},
410
+ ]
411
+ }
392
412
 
393
413
 
394
414
  def test_given_stream_is_not_declarative_stream_when_list_streams_then_return_exception_message(manifest_declarative_source):
@@ -7,17 +7,17 @@ from typing import Iterator
7
7
  from unittest.mock import MagicMock
8
8
 
9
9
  import pytest
10
+ from airbyte_cdk.connector_builder.message_grouper import MessageGrouper
11
+ from airbyte_cdk.connector_builder.models import HttpRequest, HttpResponse, LogMessage, StreamRead, StreamReadPages
10
12
  from airbyte_cdk.models import AirbyteLogMessage, AirbyteMessage, AirbyteRecordMessage, Level
11
13
  from airbyte_cdk.models import Type as MessageType
12
- from connector_builder.message_grouper import MessageGrouper
13
- from connector_builder.models import HttpRequest, HttpResponse, StreamRead, StreamReadPages
14
14
  from unit_tests.connector_builder.utils import create_configured_catalog
15
15
 
16
16
  MAX_PAGES_PER_SLICE = 4
17
17
  MAX_SLICES = 3
18
18
 
19
19
  MANIFEST = {
20
- "version": "0.1.0",
20
+ "version": "0.30.0",
21
21
  "type": "DeclarativeSource",
22
22
  "definitions": {
23
23
  "selector": {"extractor": {"field_path": ["items"], "type": "DpathExtractor"}, "type": "RecordSelector"},
@@ -124,8 +124,9 @@ def test_get_grouped_messages():
124
124
  )
125
125
 
126
126
  connector_builder_handler = MessageGrouper(MAX_PAGES_PER_SLICE, MAX_SLICES)
127
- actual_response: StreamRead = connector_builder_handler.get_message_groups(source=mock_source, config=CONFIG,
128
- configured_catalog=create_configured_catalog("hashiras"))
127
+ actual_response: StreamRead = connector_builder_handler.get_message_groups(
128
+ source=mock_source, config=CONFIG, configured_catalog=create_configured_catalog("hashiras")
129
+ )
129
130
  assert actual_response.inferred_schema == expected_schema
130
131
 
131
132
  single_slice = actual_response.slices[0]
@@ -166,9 +167,9 @@ def test_get_grouped_messages_with_logs():
166
167
  ),
167
168
  ]
168
169
  expected_logs = [
169
- {"message": "log message before the request"},
170
- {"message": "log message during the page"},
171
- {"message": "log message after the response"},
170
+ LogMessage(**{"message": "log message before the request", "level": "INFO"}),
171
+ LogMessage(**{"message": "log message during the page", "level": "INFO"}),
172
+ LogMessage(**{"message": "log message after the response", "level": "INFO"}),
172
173
  ]
173
174
 
174
175
  mock_source = make_mock_source(
@@ -187,8 +188,9 @@ def test_get_grouped_messages_with_logs():
187
188
 
188
189
  connector_builder_handler = MessageGrouper(MAX_PAGES_PER_SLICE, MAX_SLICES)
189
190
 
190
- actual_response: StreamRead = connector_builder_handler.get_message_groups(source=mock_source, config=CONFIG,
191
- configured_catalog=create_configured_catalog("hashiras"))
191
+ actual_response: StreamRead = connector_builder_handler.get_message_groups(
192
+ source=mock_source, config=CONFIG, configured_catalog=create_configured_catalog("hashiras")
193
+ )
192
194
  single_slice = actual_response.slices[0]
193
195
  for i, actual_page in enumerate(single_slice.pages):
194
196
  assert actual_page == expected_pages[i]
@@ -229,9 +231,9 @@ def test_get_grouped_messages_record_limit(request_record_limit, max_record_limi
229
231
  record_limit = min(request_record_limit, max_record_limit)
230
232
 
231
233
  api = MessageGrouper(MAX_PAGES_PER_SLICE, MAX_SLICES, max_record_limit=max_record_limit)
232
- actual_response: StreamRead = api.get_message_groups(mock_source, config=CONFIG,
233
- configured_catalog=create_configured_catalog("hashiras"),
234
- record_limit=request_record_limit)
234
+ actual_response: StreamRead = api.get_message_groups(
235
+ mock_source, config=CONFIG, configured_catalog=create_configured_catalog("hashiras"), record_limit=request_record_limit
236
+ )
235
237
  single_slice = actual_response.slices[0]
236
238
  total_records = 0
237
239
  for i, actual_page in enumerate(single_slice.pages):
@@ -270,8 +272,9 @@ def test_get_grouped_messages_default_record_limit(max_record_limit):
270
272
  n_records = 2
271
273
 
272
274
  api = MessageGrouper(MAX_PAGES_PER_SLICE, MAX_SLICES, max_record_limit=max_record_limit)
273
- actual_response: StreamRead = api.get_message_groups(source=mock_source, config=CONFIG,
274
- configured_catalog=create_configured_catalog("hashiras"))
275
+ actual_response: StreamRead = api.get_message_groups(
276
+ source=mock_source, config=CONFIG, configured_catalog=create_configured_catalog("hashiras")
277
+ )
275
278
  single_slice = actual_response.slices[0]
276
279
  total_records = 0
277
280
  for i, actual_page in enumerate(single_slice.pages):
@@ -352,8 +355,9 @@ def test_get_grouped_messages_no_records():
352
355
 
353
356
  message_grouper = MessageGrouper(MAX_PAGES_PER_SLICE, MAX_SLICES)
354
357
 
355
- actual_response: StreamRead = message_grouper.get_message_groups(source=mock_source, config=CONFIG,
356
- configured_catalog=create_configured_catalog("hashiras"))
358
+ actual_response: StreamRead = message_grouper.get_message_groups(
359
+ source=mock_source, config=CONFIG, configured_catalog=create_configured_catalog("hashiras")
360
+ )
357
361
 
358
362
  single_slice = actual_response.slices[0]
359
363
  for i, actual_page in enumerate(single_slice.pages):
@@ -459,8 +463,9 @@ def test_get_grouped_messages_with_many_slices():
459
463
 
460
464
  connecto_builder_handler = MessageGrouper(MAX_PAGES_PER_SLICE, MAX_SLICES)
461
465
 
462
- stream_read: StreamRead = connecto_builder_handler.get_message_groups(source=mock_source, config=CONFIG,
463
- configured_catalog=create_configured_catalog("hashiras"))
466
+ stream_read: StreamRead = connecto_builder_handler.get_message_groups(
467
+ source=mock_source, config=CONFIG, configured_catalog=create_configured_catalog("hashiras")
468
+ )
464
469
 
465
470
  assert not stream_read.test_read_limit_reached
466
471
  assert len(stream_read.slices) == 2
@@ -484,8 +489,9 @@ def test_get_grouped_messages_given_maximum_number_of_slices_then_test_read_limi
484
489
 
485
490
  api = MessageGrouper(MAX_PAGES_PER_SLICE, MAX_SLICES)
486
491
 
487
- stream_read: StreamRead = api.get_message_groups(source=mock_source, config=CONFIG,
488
- configured_catalog=create_configured_catalog("hashiras"))
492
+ stream_read: StreamRead = api.get_message_groups(
493
+ source=mock_source, config=CONFIG, configured_catalog=create_configured_catalog("hashiras")
494
+ )
489
495
 
490
496
  assert stream_read.test_read_limit_reached
491
497
 
@@ -500,12 +506,28 @@ def test_get_grouped_messages_given_maximum_number_of_pages_then_test_read_limit
500
506
 
501
507
  api = MessageGrouper(MAX_PAGES_PER_SLICE, MAX_SLICES)
502
508
 
503
- stream_read: StreamRead = api.get_message_groups(source=mock_source, config=CONFIG,
504
- configured_catalog=create_configured_catalog("hashiras"))
509
+ stream_read: StreamRead = api.get_message_groups(
510
+ source=mock_source, config=CONFIG, configured_catalog=create_configured_catalog("hashiras")
511
+ )
505
512
 
506
513
  assert stream_read.test_read_limit_reached
507
514
 
508
515
 
516
+ def test_read_stream_returns_error_if_stream_does_not_exist():
517
+ mock_source = MagicMock()
518
+ mock_source.read.side_effect = ValueError("error")
519
+
520
+ full_config = {**CONFIG, **{"__injected_declarative_manifest": MANIFEST}}
521
+
522
+ message_grouper = MessageGrouper(MAX_PAGES_PER_SLICE, MAX_SLICES)
523
+ actual_response = message_grouper.get_message_groups(source=mock_source, config=full_config,
524
+ configured_catalog=create_configured_catalog("not_in_manifest"))
525
+
526
+ assert 1 == len(actual_response.logs)
527
+ assert "Traceback" in actual_response.logs[0].message
528
+ assert "ERROR" in actual_response.logs[0].level
529
+
530
+
509
531
  def make_mock_source(return_value: Iterator) -> MagicMock:
510
532
  mock_source = MagicMock()
511
533
  mock_source.read.return_value = return_value
File without changes
File without changes