airbyte-source-iterable 0.5.3__tar.gz → 0.5.4__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.5.3 → airbyte_source_iterable-0.5.4}/PKG-INFO +2 -2
  2. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/pyproject.toml +2 -2
  3. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/streams.py +16 -3
  4. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/README.md +0 -0
  5. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/__init__.py +0 -0
  6. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/components.py +0 -0
  7. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/manifest.yaml +0 -0
  8. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/run.py +0 -0
  9. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/campaigns.json +0 -0
  10. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/campaigns_metrics.json +0 -0
  11. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/channels.json +0 -0
  12. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/email_bounce.json +0 -0
  13. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/email_click.json +0 -0
  14. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/email_complaint.json +0 -0
  15. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/email_open.json +0 -0
  16. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/email_send.json +0 -0
  17. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/email_send_skip.json +0 -0
  18. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/email_subscribe.json +0 -0
  19. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/email_unsubscribe.json +0 -0
  20. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/events.json +0 -0
  21. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/list_users.json +0 -0
  22. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/lists.json +0 -0
  23. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/message_types.json +0 -0
  24. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/metadata.json +0 -0
  25. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/templates.json +0 -0
  26. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/schemas/users.json +0 -0
  27. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/slice_generators.py +0 -0
  28. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/source.py +0 -0
  29. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/source_iterable/spec.json +0 -0
  30. {airbyte_source_iterable-0.5.3 → airbyte_source_iterable-0.5.4}/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.5.3
3
+ Version: 0.5.4
4
4
  Summary: Source implementation for Iterable.
5
5
  Home-page: https://airbyte.com
6
6
  License: MIT
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.9
13
13
  Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
- Requires-Dist: airbyte-cdk (==0.89.0)
15
+ Requires-Dist: airbyte-cdk (==0.90.0)
16
16
  Requires-Dist: pendulum (==2.1.2)
17
17
  Requires-Dist: python-dateutil (==2.8.2)
18
18
  Requires-Dist: requests (==2.31.0)
@@ -5,7 +5,7 @@ requires = [
5
5
  build-backend = "poetry.core.masonry.api"
6
6
 
7
7
  [tool.poetry]
8
- version = "0.5.3"
8
+ version = "0.5.4"
9
9
  name = "airbyte-source-iterable"
10
10
  description = "Source implementation for Iterable."
11
11
  authors = [
@@ -23,7 +23,7 @@ packages = [
23
23
  [tool.poetry.dependencies]
24
24
  python = "^3.9,<3.12"
25
25
  pendulum = "==2.1.2"
26
- airbyte-cdk = "0.89.0"
26
+ airbyte-cdk = "0.90.0"
27
27
  requests = "==2.31.0"
28
28
  python-dateutil = "==2.8.2"
29
29
 
@@ -12,7 +12,7 @@ import pendulum
12
12
  import requests
13
13
  from airbyte_cdk.models import SyncMode
14
14
  from airbyte_cdk.sources.streams.availability_strategy import AvailabilityStrategy
15
- from airbyte_cdk.sources.streams.core import package_name_from_class
15
+ from airbyte_cdk.sources.streams.core import CheckpointMixin, package_name_from_class
16
16
  from airbyte_cdk.sources.streams.http import HttpStream
17
17
  from airbyte_cdk.sources.streams.http.exceptions import DefaultBackoffException, UserDefinedBackoffException
18
18
  from airbyte_cdk.sources.utils.schema_helpers import ResourceSchemaLoader
@@ -128,7 +128,7 @@ class IterableStream(HttpStream, ABC):
128
128
  raise e
129
129
 
130
130
 
131
- class IterableExportStream(IterableStream, ABC):
131
+ class IterableExportStream(IterableStream, CheckpointMixin, ABC):
132
132
  """
133
133
  This stream utilize "export" Iterable api for getting large amount of data.
134
134
  It can return data in form of new line separater strings each of each
@@ -143,6 +143,14 @@ class IterableExportStream(IterableStream, ABC):
143
143
  cursor_field = "createdAt"
144
144
  primary_key = None
145
145
 
146
+ @property
147
+ def state(self) -> MutableMapping[str, Any]:
148
+ return self._state
149
+
150
+ @state.setter
151
+ def state(self, value: MutableMapping[str, Any]):
152
+ self._state = value
153
+
146
154
  def __init__(self, start_date=None, end_date=None, **kwargs):
147
155
  super().__init__(**kwargs)
148
156
  self._start_date = pendulum.parse(start_date)
@@ -162,7 +170,12 @@ class IterableExportStream(IterableStream, ABC):
162
170
  raise ValueError(f"Unsupported type of datetime field {type(value)}")
163
171
  return value
164
172
 
165
- def get_updated_state(
173
+ def read_records(self, **kwargs) -> Iterable[Mapping[str, Any]]:
174
+ for record in super().read_records(**kwargs):
175
+ self.state = self._get_updated_state(self.state, record)
176
+ yield record
177
+
178
+ def _get_updated_state(
166
179
  self,
167
180
  current_stream_state: MutableMapping[str, Any],
168
181
  latest_record: Mapping[str, Any],