@@ -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)
5050if 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:
150151if 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)
193195if res.connection_response is not None :
194196 # handle response
195197 pass
198+
196199```
197200
198201
199202### Override Server URL Per-Client
200203
201204The 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)
224227if 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
237241For example, you could specify a header for every request that this sdk makes as follows:
238242``` python
239- import airbyte
243+ import airbyte_api
240244import requests
241245
242246http_client = requests.Session()
243247http_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
262266You 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)
284288if res.connection_response is not None :
285289 # handle response
286290 pass
291+
287292```
288293<!-- End Authentication [security] -->
289294
0 commit comments