Skip to content

Commit d80a8db

Browse files
authored
Refactor: Regenerate with new name (airbyte_api) and consolidated module hierarchy (#72)
1 parent a439ef8 commit d80a8db

File tree

2,870 files changed

+71640
-15985
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,870 files changed

+71640
-15985
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ src/*.egg-info/
55
__pycache__/
66
.pytest_cache/
77
.python-version`
8+
.env

.speakeasy/gen.lock

+2,248-2,230
Large diffs are not rendered by default.

.speakeasy/workflow.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
workflowVersion: 1.0.0
2+
sources:
3+
my-source:
4+
inputs:
5+
- location: ./airbyte-api.openapi.yaml
6+
targets:
7+
python-api:
8+
target: python
9+
source: my-source
10+
publish:
11+
pypi:
12+
token: $PYPI_TOKEN

README.md

+38-33
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ pip install airbyte-api
2727
### Example
2828

2929
```python
30-
import airbyte
31-
from airbyte.models import shared
30+
import airbyte_api
31+
from airbyte_api import models
3232

33-
s = airbyte.Airbyte(
34-
security=shared.Security(
35-
basic_auth=shared.SchemeBasicAuth(
33+
s = airbyte_api.AirbyteAPI(
34+
security=models.Security(
35+
basic_auth=models.SchemeBasicAuth(
3636
password="<YOUR_PASSWORD_HERE>",
3737
username="<YOUR_USERNAME_HERE>",
3838
),
3939
),
4040
)
4141

42-
req = shared.ConnectionCreateRequest(
42+
req = models.ConnectionCreateRequest(
4343
destination_id='c669dd1e-3620-483e-afc8-55914e0a570f',
4444
source_id='6dd427d8-3a55-4584-b835-842325b6c7b3',
4545
namespace_format='${SOURCE_NAMESPACE}',
@@ -50,6 +50,7 @@ res = s.connections.create_connection(req)
5050
if res.connection_response is not None:
5151
# handle response
5252
pass
53+
5354
```
5455
<!-- End SDK Example Usage [usage] -->
5556

@@ -117,24 +118,24 @@ Handling errors in this SDK should largely match your expectations. All operati
117118

118119
| Error Object | Status Code | Content Type |
119120
| --------------- | --------------- | --------------- |
120-
| errors.SDKError | 4x-5xx | */* |
121+
| errors.SDKError | 4xx-5xx | */* |
121122

122123
### Example
123124

124125
```python
125-
import airbyte
126-
from airbyte.models import errors, shared
126+
import airbyte_api
127+
from airbyte_api import errors, models
127128

128-
s = airbyte.Airbyte(
129-
security=shared.Security(
130-
basic_auth=shared.SchemeBasicAuth(
129+
s = airbyte_api.AirbyteAPI(
130+
security=models.Security(
131+
basic_auth=models.SchemeBasicAuth(
131132
password="<YOUR_PASSWORD_HERE>",
132133
username="<YOUR_USERNAME_HERE>",
133134
),
134135
),
135136
)
136137

137-
req = shared.ConnectionCreateRequest(
138+
req = models.ConnectionCreateRequest(
138139
destination_id='c669dd1e-3620-483e-afc8-55914e0a570f',
139140
source_id='6dd427d8-3a55-4584-b835-842325b6c7b3',
140141
namespace_format='${SOURCE_NAMESPACE}',
@@ -150,6 +151,7 @@ except errors.SDKError as e:
150151
if res.connection_response is not None:
151152
# handle response
152153
pass
154+
153155
```
154156
<!-- End Error Handling [errors] -->
155157

@@ -169,20 +171,20 @@ You can override the default server globally by passing a server index to the `s
169171
#### Example
170172

171173
```python
172-
import airbyte
173-
from airbyte.models import shared
174+
import airbyte_api
175+
from airbyte_api import models
174176

175-
s = airbyte.Airbyte(
177+
s = airbyte_api.AirbyteAPI(
176178
server_idx=0,
177-
security=shared.Security(
178-
basic_auth=shared.SchemeBasicAuth(
179+
security=models.Security(
180+
basic_auth=models.SchemeBasicAuth(
179181
password="<YOUR_PASSWORD_HERE>",
180182
username="<YOUR_USERNAME_HERE>",
181183
),
182184
),
183185
)
184186

185-
req = shared.ConnectionCreateRequest(
187+
req = models.ConnectionCreateRequest(
186188
destination_id='c669dd1e-3620-483e-afc8-55914e0a570f',
187189
source_id='6dd427d8-3a55-4584-b835-842325b6c7b3',
188190
namespace_format='${SOURCE_NAMESPACE}',
@@ -193,27 +195,28 @@ res = s.connections.create_connection(req)
193195
if res.connection_response is not None:
194196
# handle response
195197
pass
198+
196199
```
197200

198201

199202
### Override Server URL Per-Client
200203

201204
The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
202205
```python
203-
import airbyte
204-
from airbyte.models import shared
206+
import airbyte_api
207+
from airbyte_api import models
205208

206-
s = airbyte.Airbyte(
209+
s = airbyte_api.AirbyteAPI(
207210
server_url="https://api.airbyte.com/v1",
208-
security=shared.Security(
209-
basic_auth=shared.SchemeBasicAuth(
211+
security=models.Security(
212+
basic_auth=models.SchemeBasicAuth(
210213
password="<YOUR_PASSWORD_HERE>",
211214
username="<YOUR_USERNAME_HERE>",
212215
),
213216
),
214217
)
215218

216-
req = shared.ConnectionCreateRequest(
219+
req = models.ConnectionCreateRequest(
217220
destination_id='c669dd1e-3620-483e-afc8-55914e0a570f',
218221
source_id='6dd427d8-3a55-4584-b835-842325b6c7b3',
219222
namespace_format='${SOURCE_NAMESPACE}',
@@ -224,6 +227,7 @@ res = s.connections.create_connection(req)
224227
if res.connection_response is not None:
225228
# handle response
226229
pass
230+
227231
```
228232
<!-- End Server Selection [server] -->
229233

@@ -236,12 +240,12 @@ The Python SDK makes API calls using the [requests](https://pypi.org/project/req
236240

237241
For example, you could specify a header for every request that this sdk makes as follows:
238242
```python
239-
import airbyte
243+
import airbyte_api
240244
import requests
241245

242246
http_client = requests.Session()
243247
http_client.headers.update({'x-custom-header': 'someValue'})
244-
s = airbyte.Airbyte(client: http_client)
248+
s = airbyte_api.AirbyteAPI(client=http_client)
245249
```
246250
<!-- End Custom HTTP Client [http-client] -->
247251

@@ -261,19 +265,19 @@ This SDK supports the following security schemes globally:
261265

262266
You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
263267
```python
264-
import airbyte
265-
from airbyte.models import shared
268+
import airbyte_api
269+
from airbyte_api import models
266270

267-
s = airbyte.Airbyte(
268-
security=shared.Security(
269-
basic_auth=shared.SchemeBasicAuth(
271+
s = airbyte_api.AirbyteAPI(
272+
security=models.Security(
273+
basic_auth=models.SchemeBasicAuth(
270274
password="<YOUR_PASSWORD_HERE>",
271275
username="<YOUR_USERNAME_HERE>",
272276
),
273277
),
274278
)
275279

276-
req = shared.ConnectionCreateRequest(
280+
req = models.ConnectionCreateRequest(
277281
destination_id='c669dd1e-3620-483e-afc8-55914e0a570f',
278282
source_id='6dd427d8-3a55-4584-b835-842325b6c7b3',
279283
namespace_format='${SOURCE_NAMESPACE}',
@@ -284,6 +288,7 @@ res = s.connections.create_connection(req)
284288
if res.connection_response is not None:
285289
# handle response
286290
pass
291+
287292
```
288293
<!-- End Authentication [security] -->
289294

USAGE.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<!-- Start SDK Example Usage [usage] -->
22
```python
3-
import airbyte
4-
from airbyte.models import shared
3+
import airbyte_api
4+
from airbyte_api import models
55

6-
s = airbyte.Airbyte(
7-
security=shared.Security(
8-
basic_auth=shared.SchemeBasicAuth(
6+
s = airbyte_api.AirbyteAPI(
7+
security=models.Security(
8+
basic_auth=models.SchemeBasicAuth(
99
password="<YOUR_PASSWORD_HERE>",
1010
username="<YOUR_USERNAME_HERE>",
1111
),
1212
),
1313
)
1414

15-
req = shared.ConnectionCreateRequest(
15+
req = models.ConnectionCreateRequest(
1616
destination_id='c669dd1e-3620-483e-afc8-55914e0a570f',
1717
source_id='6dd427d8-3a55-4584-b835-842325b6c7b3',
1818
namespace_format='${SOURCE_NAMESPACE}',
@@ -23,5 +23,6 @@ res = s.connections.create_connection(req)
2323
if res.connection_response is not None:
2424
# handle response
2525
pass
26+
2627
```
2728
<!-- End SDK Example Usage [usage] -->

0 commit comments

Comments
 (0)