airbyte-source-commcare 0.1.23__tar.gz → 0.1.25__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {airbyte_source_commcare-0.1.23 → airbyte_source_commcare-0.1.25}/PKG-INFO +1 -1
- {airbyte_source_commcare-0.1.23 → airbyte_source_commcare-0.1.25}/pyproject.toml +1 -1
- {airbyte_source_commcare-0.1.23 → airbyte_source_commcare-0.1.25}/source_commcare/source.py +2 -7
- {airbyte_source_commcare-0.1.23 → airbyte_source_commcare-0.1.25}/README.md +0 -0
- {airbyte_source_commcare-0.1.23 → airbyte_source_commcare-0.1.25}/source_commcare/__init__.py +0 -0
- {airbyte_source_commcare-0.1.23 → airbyte_source_commcare-0.1.25}/source_commcare/run.py +0 -0
- {airbyte_source_commcare-0.1.23 → airbyte_source_commcare-0.1.25}/source_commcare/schemas/TODO.md +0 -0
- {airbyte_source_commcare-0.1.23 → airbyte_source_commcare-0.1.25}/source_commcare/spec.yaml +0 -0
@@ -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
|
{airbyte_source_commcare-0.1.23 → airbyte_source_commcare-0.1.25}/source_commcare/__init__.py
RENAMED
File without changes
|
File without changes
|
{airbyte_source_commcare-0.1.23 → airbyte_source_commcare-0.1.25}/source_commcare/schemas/TODO.md
RENAMED
File without changes
|
File without changes
|