airbyte-source-iterable 0.6.20__tar.gz → 0.6.21__tar.gz

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 (30) hide show
  1. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/PKG-INFO +1 -1
  2. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/pyproject.toml +1 -1
  3. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/components.py +1 -0
  4. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/source.py +2 -0
  5. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/streams.py +5 -8
  6. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/README.md +0 -0
  7. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/__init__.py +0 -0
  8. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/manifest.yaml +0 -0
  9. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/run.py +0 -0
  10. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/campaigns.json +0 -0
  11. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/campaigns_metrics.json +0 -0
  12. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/channels.json +0 -0
  13. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/email_bounce.json +0 -0
  14. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/email_click.json +0 -0
  15. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/email_complaint.json +0 -0
  16. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/email_open.json +0 -0
  17. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/email_send.json +0 -0
  18. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/email_send_skip.json +0 -0
  19. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/email_subscribe.json +0 -0
  20. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/email_unsubscribe.json +0 -0
  21. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/events.json +0 -0
  22. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/list_users.json +0 -0
  23. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/lists.json +0 -0
  24. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/message_types.json +0 -0
  25. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/metadata.json +0 -0
  26. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/templates.json +0 -0
  27. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/schemas/users.json +0 -0
  28. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/slice_generators.py +0 -0
  29. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/spec.json +0 -0
  30. {airbyte_source_iterable-0.6.20 → airbyte_source_iterable-0.6.21}/source_iterable/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-source-iterable
3
- Version: 0.6.20
3
+ Version: 0.6.21
4
4
  Summary: Source implementation for Iterable.
5
5
  Home-page: https://airbyte.com
6
6
  License: MIT
@@ -5,7 +5,7 @@ requires = [
5
5
  build-backend = "poetry.core.masonry.api"
6
6
 
7
7
  [tool.poetry]
8
- version = "0.6.20"
8
+ version = "0.6.21"
9
9
  name = "airbyte-source-iterable"
10
10
  description = "Source implementation for Iterable."
11
11
  authors = [
@@ -6,6 +6,7 @@ from dataclasses import dataclass
6
6
  from typing import Any, Iterable, Mapping
7
7
 
8
8
  import requests
9
+
9
10
  from airbyte_cdk.sources.declarative.extractors.dpath_extractor import DpathExtractor
10
11
 
11
12
 
@@ -47,6 +47,7 @@ from .streams import (
47
47
  WebPushSendSkip,
48
48
  )
49
49
 
50
+
50
51
  """
51
52
  This file provides the necessary constructs to interpret a provided declarative YAML configuration file into
52
53
  source connector.
@@ -54,6 +55,7 @@ source connector.
54
55
  WARNING: Do not modify this file.
55
56
  """
56
57
 
58
+
57
59
  # Declarative Source
58
60
  class SourceIterable(YamlDeclarativeSource):
59
61
  def __init__(self):
@@ -10,18 +10,20 @@ from typing import Any, Dict, Iterable, List, Mapping, MutableMapping, Optional,
10
10
 
11
11
  import pendulum
12
12
  import requests
13
+ from pendulum.datetime import DateTime
14
+ from requests import HTTPError
15
+ from requests.exceptions import ChunkedEncodingError
16
+
13
17
  from airbyte_cdk.models import SyncMode
14
18
  from airbyte_cdk.sources.streams.availability_strategy import AvailabilityStrategy
15
19
  from airbyte_cdk.sources.streams.core import CheckpointMixin, package_name_from_class
16
20
  from airbyte_cdk.sources.streams.http import HttpStream
17
21
  from airbyte_cdk.sources.streams.http.exceptions import DefaultBackoffException, UserDefinedBackoffException
18
22
  from airbyte_cdk.sources.utils.schema_helpers import ResourceSchemaLoader
19
- from pendulum.datetime import DateTime
20
- from requests import HTTPError
21
- from requests.exceptions import ChunkedEncodingError
22
23
  from source_iterable.slice_generators import AdjustableSliceGenerator, RangeSliceGenerator, StreamSlice
23
24
  from source_iterable.utils import dateutil_parse
24
25
 
26
+
25
27
  EVENT_ROWS_LIMIT = 200
26
28
  CAMPAIGNS_PER_REQUEST = 20
27
29
 
@@ -202,7 +204,6 @@ class IterableExportStream(IterableStream, CheckpointMixin, ABC):
202
204
  stream_slice: StreamSlice,
203
205
  next_page_token: Mapping[str, Any] = None,
204
206
  ) -> MutableMapping[str, Any]:
205
-
206
207
  params = super().request_params(stream_state=stream_state)
207
208
  params.update(
208
209
  {
@@ -250,7 +251,6 @@ class IterableExportStream(IterableStream, CheckpointMixin, ABC):
250
251
  cursor_field: List[str] = None,
251
252
  stream_state: Mapping[str, Any] = None,
252
253
  ) -> Iterable[Optional[StreamSlice]]:
253
-
254
254
  start_datetime = self.get_start_date(stream_state)
255
255
  return [StreamSlice(start_datetime, self._end_date or pendulum.now("UTC"))]
256
256
 
@@ -268,7 +268,6 @@ class IterableExportStreamRanged(IterableExportStream, ABC):
268
268
  cursor_field: List[str] = None,
269
269
  stream_state: Mapping[str, Any] = None,
270
270
  ) -> Iterable[Optional[StreamSlice]]:
271
-
272
271
  start_datetime = self.get_start_date(stream_state)
273
272
 
274
273
  return RangeSliceGenerator(start_datetime, self._end_date)
@@ -303,7 +302,6 @@ class IterableExportStreamAdjustableRange(IterableExportStream, ABC):
303
302
  cursor_field: List[str] = None,
304
303
  stream_state: Mapping[str, Any] = None,
305
304
  ) -> Iterable[Optional[StreamSlice]]:
306
-
307
305
  start_datetime = self.get_start_date(stream_state)
308
306
  self._adjustable_generator = AdjustableSliceGenerator(start_datetime, self._end_date)
309
307
  return self._adjustable_generator
@@ -318,7 +316,6 @@ class IterableExportStreamAdjustableRange(IterableExportStream, ABC):
318
316
  start_time = pendulum.now()
319
317
  for _ in range(self.CHUNKED_ENCODING_ERROR_RETRIES):
320
318
  try:
321
-
322
319
  self.logger.info(
323
320
  f"Processing slice of {(stream_slice.end_date - stream_slice.start_date).total_days()} days for stream {self.name}"
324
321
  )