airbyte-source-commcare 0.1.23__py3-none-any.whl → 0.1.25__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- {airbyte_source_commcare-0.1.23.dist-info → airbyte_source_commcare-0.1.25.dist-info}/METADATA +1 -1
- {airbyte_source_commcare-0.1.23.dist-info → airbyte_source_commcare-0.1.25.dist-info}/RECORD +5 -5
- source_commcare/source.py +2 -7
- {airbyte_source_commcare-0.1.23.dist-info → airbyte_source_commcare-0.1.25.dist-info}/WHEEL +0 -0
- {airbyte_source_commcare-0.1.23.dist-info → airbyte_source_commcare-0.1.25.dist-info}/entry_points.txt +0 -0
{airbyte_source_commcare-0.1.23.dist-info → airbyte_source_commcare-0.1.25.dist-info}/RECORD
RENAMED
@@ -1,9 +1,9 @@
|
|
1
1
|
source_commcare/__init__.py,sha256=e2gcZC5sfkJ_uidHqoPCVmqUdL9mhpMrw4Ix4uIzSng,128
|
2
2
|
source_commcare/run.py,sha256=aZZ10q2rM_fY8lmNk4Gmb_pOhDJvv-biHN6V-ut5Y6I,236
|
3
3
|
source_commcare/schemas/TODO.md,sha256=buGbe_7mhRgtXK4cy-WI8y4HUKWnOYA6OPZCcFQJ2CI,1650
|
4
|
-
source_commcare/source.py,sha256=
|
4
|
+
source_commcare/source.py,sha256=Qe1hvgTA_oi4yGOuqjO1feS1RW4b2OLpOUeAzGjz0-Y,12951
|
5
5
|
source_commcare/spec.yaml,sha256=CMpevuCDKMFZmq16CdeilpvXKbCiQPjmI1fcgzvJQuQ,1019
|
6
|
-
airbyte_source_commcare-0.1.
|
7
|
-
airbyte_source_commcare-0.1.
|
8
|
-
airbyte_source_commcare-0.1.
|
9
|
-
airbyte_source_commcare-0.1.
|
6
|
+
airbyte_source_commcare-0.1.25.dist-info/METADATA,sha256=Io7NLgwaOaxg-wHsVgPwGr2dRnCI5ecazYPtZI8ILxI,5378
|
7
|
+
airbyte_source_commcare-0.1.25.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
8
|
+
airbyte_source_commcare-0.1.25.dist-info/entry_points.txt,sha256=VN7tZop8Ykxus1n-_6w4MVOlQ_uY0lQRF9w1ghGuJk0,59
|
9
|
+
airbyte_source_commcare-0.1.25.dist-info/RECORD,,
|
source_commcare/source.py
CHANGED
@@ -9,12 +9,13 @@ from typing import Any, Iterable, List, Mapping, MutableMapping, Optional, Tuple
|
|
9
9
|
from urllib.parse import parse_qs
|
10
10
|
|
11
11
|
import requests
|
12
|
+
from flatten_json import flatten
|
13
|
+
|
12
14
|
from airbyte_cdk.models import SyncMode
|
13
15
|
from airbyte_cdk.sources import AbstractSource
|
14
16
|
from airbyte_cdk.sources.streams import IncrementalMixin, Stream
|
15
17
|
from airbyte_cdk.sources.streams.http import HttpStream
|
16
18
|
from airbyte_cdk.sources.streams.http.requests_native_auth import TokenAuthenticator
|
17
|
-
from flatten_json import flatten
|
18
19
|
|
19
20
|
|
20
21
|
# Basic full refresh stream
|
@@ -56,7 +57,6 @@ class CommcareStream(HttpStream, ABC):
|
|
56
57
|
def request_params(
|
57
58
|
self, stream_state: Mapping[str, Any], stream_slice: Mapping[str, any] = None, next_page_token: Mapping[str, Any] = None
|
58
59
|
) -> MutableMapping[str, Any]:
|
59
|
-
|
60
60
|
params = {"format": "json"}
|
61
61
|
return params
|
62
62
|
|
@@ -79,7 +79,6 @@ class Application(CommcareStream):
|
|
79
79
|
def request_params(
|
80
80
|
self, stream_state: Mapping[str, Any], stream_slice: Mapping[str, any] = None, next_page_token: Mapping[str, Any] = None
|
81
81
|
) -> MutableMapping[str, Any]:
|
82
|
-
|
83
82
|
params = {"format": "json", "extras": "true"}
|
84
83
|
return params
|
85
84
|
|
@@ -123,7 +122,6 @@ class IncrementalStream(CommcareStream, IncrementalMixin):
|
|
123
122
|
def request_params(
|
124
123
|
self, stream_state: Mapping[str, Any], stream_slice: Mapping[str, any] = None, next_page_token: Mapping[str, Any] = None
|
125
124
|
) -> MutableMapping[str, Any]:
|
126
|
-
|
127
125
|
params = {"format": "json"}
|
128
126
|
if next_page_token:
|
129
127
|
params.update(next_page_token)
|
@@ -136,7 +134,6 @@ class IncrementalStream(CommcareStream, IncrementalMixin):
|
|
136
134
|
|
137
135
|
|
138
136
|
class Case(IncrementalStream):
|
139
|
-
|
140
137
|
"""
|
141
138
|
docs: https://www.commcarehq.org/a/[domain]/api/[version]/case/
|
142
139
|
"""
|
@@ -167,7 +164,6 @@ class Case(IncrementalStream):
|
|
167
164
|
def request_params(
|
168
165
|
self, stream_state: Mapping[str, Any], stream_slice: Mapping[str, any] = None, next_page_token: Mapping[str, Any] = None
|
169
166
|
) -> MutableMapping[str, Any]:
|
170
|
-
|
171
167
|
# start date is what we saved for forms
|
172
168
|
# if self.cursor_field in self.state else (CommcareStream.last_form_date or self.initial_date)
|
173
169
|
ix = self.state[self.cursor_field]
|
@@ -234,7 +230,6 @@ class Form(IncrementalStream):
|
|
234
230
|
def request_params(
|
235
231
|
self, stream_state: Mapping[str, Any], stream_slice: Mapping[str, any] = None, next_page_token: Mapping[str, Any] = None
|
236
232
|
) -> MutableMapping[str, Any]:
|
237
|
-
|
238
233
|
# if self.cursor_field in self.state else self.initial_date
|
239
234
|
ix = self.state[self.cursor_field]
|
240
235
|
params = {
|
File without changes
|
File without changes
|