airbyte-source-iterable 0.5.1.dev202405192159__py3-none-any.whl → 0.5.2__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.
- {airbyte_source_iterable-0.5.1.dev202405192159.dist-info → airbyte_source_iterable-0.5.2.dist-info}/METADATA +2 -2
- {airbyte_source_iterable-0.5.1.dev202405192159.dist-info → airbyte_source_iterable-0.5.2.dist-info}/RECORD +6 -6
- source_iterable/components.py +9 -8
- source_iterable/manifest.yaml +1 -1
- {airbyte_source_iterable-0.5.1.dev202405192159.dist-info → airbyte_source_iterable-0.5.2.dist-info}/WHEEL +0 -0
- {airbyte_source_iterable-0.5.1.dev202405192159.dist-info → airbyte_source_iterable-0.5.2.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: airbyte-source-iterable
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.2
|
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.
|
15
|
+
Requires-Dist: airbyte-cdk (==0.80.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)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
source_iterable/__init__.py,sha256=8WKQT800ggxG1vGPoA_ZHUkozwEM7qMhGMhzEPCdA4o,65
|
2
|
-
source_iterable/components.py,sha256=
|
3
|
-
source_iterable/manifest.yaml,sha256=
|
2
|
+
source_iterable/components.py,sha256=dHp23THc43TmogP_tCxcv12mAgZSRs5fKir2ckr4hHI,1374
|
3
|
+
source_iterable/manifest.yaml,sha256=uO7z-bIU6CtGms6IsLwjyZ-cb3tVY-vLUMLOZGkZDts,13996
|
4
4
|
source_iterable/run.py,sha256=-Bvz772Z7iJWExDoJS7chxv725hG4e9e5Engrtp66iE,236
|
5
5
|
source_iterable/schemas/campaigns.json,sha256=FONoPuz_4aRat8OZzhj7BcHFAqetpBYUDmOZfroCu7I,2494
|
6
6
|
source_iterable/schemas/campaigns_metrics.json,sha256=Aa6pNdVxHOG-LSxlLzhxFY8uIdfrPBTgX9QyWrLJ4Fs,168
|
@@ -25,7 +25,7 @@ source_iterable/source.py,sha256=AhZQ4L54VTo6jf2QltvFCqDNgqaPSEKCfR0GInCLEEc,453
|
|
25
25
|
source_iterable/spec.json,sha256=y5_YFTkPPtxjvzGtaZZql90Tc37fyZZpQKXFGPL_cYE,1009
|
26
26
|
source_iterable/streams.py,sha256=ZEC8IqBrTeD2oYOvLL51E62iOsIOK3jiTN7pLI-CwRs,19468
|
27
27
|
source_iterable/utils.py,sha256=2oM8AjBZXs9nTG_PhSWmxBWEmp-w-tWFaxQQvAfUuMM,649
|
28
|
-
airbyte_source_iterable-0.5.
|
29
|
-
airbyte_source_iterable-0.5.
|
30
|
-
airbyte_source_iterable-0.5.
|
31
|
-
airbyte_source_iterable-0.5.
|
28
|
+
airbyte_source_iterable-0.5.2.dist-info/METADATA,sha256=bwd6yztgKE8FL6GSq6ZyZ0sQGpbIlWKBETtBrvLg3-g,5362
|
29
|
+
airbyte_source_iterable-0.5.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
30
|
+
airbyte_source_iterable-0.5.2.dist-info/entry_points.txt,sha256=pjzrNtsOX3jW37IK0U5pSmLiraiuLTPr5aB5-hBXpAo,59
|
31
|
+
airbyte_source_iterable-0.5.2.dist-info/RECORD,,
|
source_iterable/components.py
CHANGED
@@ -7,7 +7,6 @@ from dataclasses import dataclass
|
|
7
7
|
from io import StringIO
|
8
8
|
|
9
9
|
import requests
|
10
|
-
from typing import Iterable
|
11
10
|
from airbyte_cdk.sources.declarative.extractors.dpath_extractor import DpathExtractor
|
12
11
|
from airbyte_cdk.sources.declarative.types import Config, Record, StreamSlice, StreamState
|
13
12
|
|
@@ -15,26 +14,28 @@ from airbyte_cdk.sources.declarative.types import Config, Record, StreamSlice, S
|
|
15
14
|
@dataclass
|
16
15
|
class XJsonRecordExtractor(DpathExtractor):
|
17
16
|
def extract_records(self, response: requests.Response) -> list[Record]:
|
18
|
-
for record in response.iter_lines()
|
19
|
-
yield json.loads(record)
|
17
|
+
return [json.loads(record) for record in response.iter_lines()]
|
20
18
|
|
21
19
|
|
22
20
|
@dataclass
|
23
21
|
class ListUsersRecordExtractor(DpathExtractor):
|
24
|
-
def extract_records(self, response: requests.Response) ->
|
25
|
-
for record in response.iter_lines()
|
26
|
-
yield {"email": record.decode()}
|
22
|
+
def extract_records(self, response: requests.Response) -> list[Record]:
|
23
|
+
return [{"email": record.decode()} for record in response.iter_lines()]
|
27
24
|
|
28
25
|
|
29
26
|
@dataclass
|
30
27
|
class EventsRecordExtractor(DpathExtractor):
|
31
28
|
common_fields = ("itblInternal", "_type", "createdAt", "email")
|
32
29
|
|
33
|
-
def extract_records(self, response: requests.Response) ->
|
30
|
+
def extract_records(self, response: requests.Response) -> list[Record]:
|
34
31
|
jsonl_records = StringIO(response.text)
|
32
|
+
records = []
|
35
33
|
for record in jsonl_records:
|
36
34
|
record_dict = json.loads(record)
|
37
35
|
record_dict_common_fields = {}
|
38
36
|
for field in self.common_fields:
|
39
37
|
record_dict_common_fields[field] = record_dict.pop(field, None)
|
40
|
-
|
38
|
+
|
39
|
+
records.append({**record_dict_common_fields, "data": record_dict})
|
40
|
+
|
41
|
+
return records
|
source_iterable/manifest.yaml
CHANGED
File without changes
|
File without changes
|