Skip to content

Commit 00e7738

Browse files
authored
Merge pull request #51 from airbytehq/speakeasy-sdk-regen-1699229642
chore: 🐝 Update SDK - Generate
2 parents 7a27bd0 + 1616efd commit 00e7738

File tree

3,047 files changed

+27073
-17105
lines changed

Some content is hidden

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

3,047 files changed

+27073
-17105
lines changed

.gitattributes

100755100644
File mode changed.

.speakeasy/gen.lock

Lines changed: 2179 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 263 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,28 @@ Developers will need to create an API Key within your [Developer Portal](https:/
1313

1414
The Developer Portal UI can also be used to help build your integration by showing information about network requests in the Requests tab. API usage information is also available to you in the Usage tab.
1515

16-
<!-- Start SDK Installation -->
16+
<!-- Start SDK Installation [installation] -->
1717
## SDK Installation
1818

1919
```bash
2020
pip install airbyte-api
2121
```
22-
<!-- End SDK Installation -->
22+
<!-- End SDK Installation [installation] -->
2323

24+
<!-- Start SDK Example Usage [usage] -->
2425
## SDK Example Usage
25-
<!-- Start SDK Example Usage -->
26+
27+
### Example
28+
2629
```python
2730
import airbyte
2831
from airbyte.models import shared
2932

3033
s = airbyte.Airbyte(
3134
security=shared.Security(
3235
basic_auth=shared.SchemeBasicAuth(
33-
password="",
34-
username="",
36+
password="<YOUR_PASSWORD_HERE>",
37+
username="<YOUR_USERNAME_HERE>",
3538
),
3639
),
3740
)
@@ -41,23 +44,23 @@ req = shared.ConnectionCreateRequest(
4144
streams=[
4245
shared.StreamConfiguration(
4346
cursor_field=[
44-
'violet',
47+
'string',
4548
],
46-
name='Account',
49+
name='string',
4750
primary_key=[
4851
[
49-
'BMW',
52+
'string',
5053
],
5154
],
5255
),
5356
],
5457
),
55-
destination_id='e362083e-afc8-4559-94e0-a570f6dd427d',
58+
destination_id='c669dd1e-3620-483e-afc8-55914e0a570f',
5659
namespace_format='${SOURCE_NAMESPACE}',
5760
schedule=shared.ConnectionSchedule(
58-
schedule_type=shared.ScheduleTypeEnum.CRON,
61+
schedule_type=shared.ScheduleTypeEnum.MANUAL,
5962
),
60-
source_id='3a555847-8358-4423-a5b6-c7b3fd2fd307',
63+
source_id='dd427d83-a555-4847-8358-42325b6c7b3f',
6164
)
6265

6366
res = s.connections.create_connection(req)
@@ -66,12 +69,11 @@ if res.connection_response is not None:
6669
# handle response
6770
pass
6871
```
69-
<!-- End SDK Example Usage -->
72+
<!-- End SDK Example Usage [usage] -->
7073

71-
<!-- Start SDK Available Operations -->
74+
<!-- Start Available Resources and Operations [operations] -->
7275
## Available Resources and Operations
7376

74-
7577
### [connections](docs/sdks/connections/README.md)
7678

7779
* [create_connection](docs/sdks/connections/README.md#create_connection) - Create a connection
@@ -118,25 +120,262 @@ if res.connection_response is not None:
118120
* [get_workspace](docs/sdks/workspaces/README.md#get_workspace) - Get Workspace details
119121
* [list_workspaces](docs/sdks/workspaces/README.md#list_workspaces) - List workspaces
120122
* [update_workspace](docs/sdks/workspaces/README.md#update_workspace) - Update a workspace
121-
<!-- End SDK Available Operations -->
123+
<!-- End Available Resources and Operations [operations] -->
124+
125+
126+
127+
128+
129+
130+
131+
<!-- Start Error Handling [errors] -->
132+
## Error Handling
133+
134+
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.
135+
136+
| Error Object | Status Code | Content Type |
137+
| --------------- | --------------- | --------------- |
138+
| errors.SDKError | 4x-5xx | */* |
139+
140+
### Example
141+
142+
```python
143+
import airbyte
144+
from airbyte.models import shared
145+
146+
s = airbyte.Airbyte(
147+
security=shared.Security(
148+
basic_auth=shared.SchemeBasicAuth(
149+
password="<YOUR_PASSWORD_HERE>",
150+
username="<YOUR_USERNAME_HERE>",
151+
),
152+
),
153+
)
154+
155+
req = shared.ConnectionCreateRequest(
156+
configurations=shared.StreamConfigurations(
157+
streams=[
158+
shared.StreamConfiguration(
159+
cursor_field=[
160+
'string',
161+
],
162+
name='string',
163+
primary_key=[
164+
[
165+
'string',
166+
],
167+
],
168+
),
169+
],
170+
),
171+
destination_id='c669dd1e-3620-483e-afc8-55914e0a570f',
172+
namespace_format='${SOURCE_NAMESPACE}',
173+
schedule=shared.ConnectionSchedule(
174+
schedule_type=shared.ScheduleTypeEnum.MANUAL,
175+
),
176+
source_id='dd427d83-a555-4847-8358-42325b6c7b3f',
177+
)
178+
179+
res = None
180+
try:
181+
res = s.connections.create_connection(req)
182+
except errors.SDKError as e:
183+
print(e) # handle exception
184+
raise(e)
185+
186+
if res.connection_response is not None:
187+
# handle response
188+
pass
189+
```
190+
<!-- End Error Handling [errors] -->
191+
192+
193+
194+
<!-- Start Server Selection [server] -->
195+
## Server Selection
196+
197+
### Select Server by Index
198+
199+
You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
200+
201+
| # | Server | Variables |
202+
| - | ------ | --------- |
203+
| 0 | `https://api.airbyte.com/v1` | None |
204+
205+
#### Example
206+
207+
```python
208+
import airbyte
209+
from airbyte.models import shared
210+
211+
s = airbyte.Airbyte(
212+
server_idx=0,
213+
security=shared.Security(
214+
basic_auth=shared.SchemeBasicAuth(
215+
password="<YOUR_PASSWORD_HERE>",
216+
username="<YOUR_USERNAME_HERE>",
217+
),
218+
),
219+
)
220+
221+
req = shared.ConnectionCreateRequest(
222+
configurations=shared.StreamConfigurations(
223+
streams=[
224+
shared.StreamConfiguration(
225+
cursor_field=[
226+
'string',
227+
],
228+
name='string',
229+
primary_key=[
230+
[
231+
'string',
232+
],
233+
],
234+
),
235+
],
236+
),
237+
destination_id='c669dd1e-3620-483e-afc8-55914e0a570f',
238+
namespace_format='${SOURCE_NAMESPACE}',
239+
schedule=shared.ConnectionSchedule(
240+
schedule_type=shared.ScheduleTypeEnum.MANUAL,
241+
),
242+
source_id='dd427d83-a555-4847-8358-42325b6c7b3f',
243+
)
244+
245+
res = s.connections.create_connection(req)
246+
247+
if res.connection_response is not None:
248+
# handle response
249+
pass
250+
```
251+
252+
253+
### Override Server URL Per-Client
254+
255+
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:
256+
```python
257+
import airbyte
258+
from airbyte.models import shared
259+
260+
s = airbyte.Airbyte(
261+
server_url="https://api.airbyte.com/v1",
262+
security=shared.Security(
263+
basic_auth=shared.SchemeBasicAuth(
264+
password="<YOUR_PASSWORD_HERE>",
265+
username="<YOUR_USERNAME_HERE>",
266+
),
267+
),
268+
)
269+
270+
req = shared.ConnectionCreateRequest(
271+
configurations=shared.StreamConfigurations(
272+
streams=[
273+
shared.StreamConfiguration(
274+
cursor_field=[
275+
'string',
276+
],
277+
name='string',
278+
primary_key=[
279+
[
280+
'string',
281+
],
282+
],
283+
),
284+
],
285+
),
286+
destination_id='c669dd1e-3620-483e-afc8-55914e0a570f',
287+
namespace_format='${SOURCE_NAMESPACE}',
288+
schedule=shared.ConnectionSchedule(
289+
schedule_type=shared.ScheduleTypeEnum.MANUAL,
290+
),
291+
source_id='dd427d83-a555-4847-8358-42325b6c7b3f',
292+
)
293+
294+
res = s.connections.create_connection(req)
295+
296+
if res.connection_response is not None:
297+
# handle response
298+
pass
299+
```
300+
<!-- End Server Selection [server] -->
122301

123302

124303

125-
<!-- Start Dev Containers -->
304+
<!-- Start Custom HTTP Client [http-client] -->
305+
## Custom HTTP Client
126306

127-
<!-- End Dev Containers -->
307+
The Python SDK makes API calls using the [requests](https://pypi.org/project/requests/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.
308+
309+
For example, you could specify a header for every request that this sdk makes as follows:
310+
```python
311+
import airbyte
312+
import requests
313+
314+
http_client = requests.Session()
315+
http_client.headers.update({'x-custom-header': 'someValue'})
316+
s = airbyte.Airbyte(client: http_client)
317+
```
318+
<!-- End Custom HTTP Client [http-client] -->
128319

129320

130321

131-
<!-- Start Pagination -->
132-
# Pagination
322+
<!-- Start Authentication [security] -->
323+
## Authentication
324+
325+
### Per-Client Security Schemes
326+
327+
This SDK supports the following security schemes globally:
328+
329+
| Name | Type | Scheme |
330+
| ------------- | ------------- | ------------- |
331+
| `basic_auth` | http | HTTP Basic |
332+
| `bearer_auth` | http | HTTP Bearer |
333+
334+
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:
335+
```python
336+
import airbyte
337+
from airbyte.models import shared
133338

134-
Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
135-
returned response object will have a `Next` method that can be called to pull down the next group of results. If the
136-
return value of `Next` is `None`, then there are no more pages to be fetched.
339+
s = airbyte.Airbyte(
340+
security=shared.Security(
341+
basic_auth=shared.SchemeBasicAuth(
342+
password="<YOUR_PASSWORD_HERE>",
343+
username="<YOUR_USERNAME_HERE>",
344+
),
345+
),
346+
)
137347

138-
Here's an example of one such pagination call:
139-
<!-- End Pagination -->
348+
req = shared.ConnectionCreateRequest(
349+
configurations=shared.StreamConfigurations(
350+
streams=[
351+
shared.StreamConfiguration(
352+
cursor_field=[
353+
'string',
354+
],
355+
name='string',
356+
primary_key=[
357+
[
358+
'string',
359+
],
360+
],
361+
),
362+
],
363+
),
364+
destination_id='c669dd1e-3620-483e-afc8-55914e0a570f',
365+
namespace_format='${SOURCE_NAMESPACE}',
366+
schedule=shared.ConnectionSchedule(
367+
schedule_type=shared.ScheduleTypeEnum.MANUAL,
368+
),
369+
source_id='dd427d83-a555-4847-8358-42325b6c7b3f',
370+
)
371+
372+
res = s.connections.create_connection(req)
373+
374+
if res.connection_response is not None:
375+
# handle response
376+
pass
377+
```
378+
<!-- End Authentication [security] -->
140379

141380
<!-- Placeholder for Future Speakeasy SDK Sections -->
142381

0 commit comments

Comments
 (0)