Skip to content

Commit a8b05c9

Browse files
authored
Merge pull request #18 from airbytehq/speakeasy-sdk-regen-1685664907
chore: speakeasy sdk regeneration - Generate
2 parents 9ebc3e3 + 5a8500f commit a8b05c9

File tree

13 files changed

+201
-274
lines changed

13 files changed

+201
-274
lines changed

RELEASES.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,20 @@ Based on:
182182
- OpenAPI Doc 1.0.0
183183
- Speakeasy CLI 1.40.2 (2.34.2) https://github.com/speakeasy-api/speakeasy
184184
### Releases
185-
- [PyPI v0.11.2] https://pypi.org/project/airbyte-api/0.11.2 - .
185+
- [PyPI v0.11.2] https://pypi.org/project/airbyte-api/0.11.2 - .
186+
187+
## 2023-06-02 00:15:05
188+
### Changes
189+
Based on:
190+
- OpenAPI Doc 1.0.0
191+
- Speakeasy CLI 1.40.3 (2.34.7) https://github.com/speakeasy-api/speakeasy
192+
### Releases
193+
- [PyPI v0.11.3] https://pypi.org/project/airbyte-api/0.11.3 - .
194+
195+
## 2023-06-03 00:13:54
196+
### Changes
197+
Based on:
198+
- OpenAPI Doc 1.0.0
199+
- Speakeasy CLI 1.43.0 (2.35.3) https://github.com/speakeasy-api/speakeasy
200+
### Releases
201+
- [PyPI v0.12.0] https://pypi.org/project/airbyte-api/0.12.0 - .

files.gen

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
src/airbyte/sdkconfiguration.py
12
src/airbyte/connections.py
23
src/airbyte/destinations.py
34
src/airbyte/jobs.py

gen.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ configVersion: 1.0.0
22
management:
33
docChecksum: e82f3e11abf47c2509f115468e75bb06
44
docVersion: 1.0.0
5-
speakeasyVersion: 1.40.2
6-
generationVersion: 2.34.2
5+
speakeasyVersion: 1.43.0
6+
generationVersion: 2.35.3
77
generation:
88
sdkClassName: airbyte
99
singleTagPerOp: false
1010
telemetryEnabled: true
1111
python:
12-
version: 0.11.2
12+
version: 0.12.0
1313
author: Airbyte
1414
description: Python Client SDK for Airbyte API
1515
maxMethodParams: 0

setup.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,29 @@
1010

1111
setuptools.setup(
1212
name="airbyte-api",
13-
version="0.11.2",
13+
version="0.12.0",
1414
author="Airbyte",
1515
description="Python Client SDK for Airbyte API",
1616
long_description=long_description,
1717
long_description_content_type="text/markdown",
1818
packages=setuptools.find_packages(where="src"),
1919
install_requires=[
20-
"certifi==2022.12.7",
21-
"charset-normalizer==2.1.1",
22-
"dataclasses-json-speakeasy==0.5.8",
23-
"idna==3.3",
24-
"jsonpath-python==1.0.6 ",
25-
"marshmallow==3.17.1",
26-
"marshmallow-enum==1.5.1",
27-
"mypy-extensions==0.4.3",
28-
"packaging==21.3",
29-
"pyparsing==3.0.9",
30-
"python-dateutil==2.8.2",
31-
"requests==2.28.1",
32-
"six==1.16.0",
33-
"typing-inspect==0.8.0",
34-
"typing_extensions==4.3.0",
35-
"urllib3==1.26.12",
20+
"certifi>=2022.12.7",
21+
"charset-normalizer>=2.1.1",
22+
"dataclasses-json-speakeasy>=0.5.8",
23+
"idna>=3.3",
24+
"jsonpath-python>=1.0.6 ",
25+
"marshmallow>=3.17.1",
26+
"marshmallow-enum>=1.5.1",
27+
"mypy-extensions>=0.4.3",
28+
"packaging>=21.3",
29+
"pyparsing>=3.0.9",
30+
"python-dateutil>=2.8.2",
31+
"requests>=2.28.1",
32+
"six>=1.16.0",
33+
"typing-inspect>=0.8.0",
34+
"typing_extensions>=4.3.0",
35+
"urllib3>=1.26.12",
3636
],
3737
extras_require={
3838
"dev":["pylint==2.16.2"]

src/airbyte/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
22

33
from .sdk import *
4+
from .sdkconfiguration import *

src/airbyte/connections.py

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,32 @@
11
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
22

3-
import requests as requests_http
4-
from . import utils
3+
from .sdkconfiguration import SDKConfiguration
4+
from airbyte import utils
55
from airbyte.models import operations, shared
66
from typing import Optional
77

88
class Connections:
9-
_client: requests_http.Session
10-
_security_client: requests_http.Session
11-
_server_url: str
12-
_language: str
13-
_sdk_version: str
14-
_gen_version: str
9+
sdk_configuration: SDKConfiguration
1510

16-
def __init__(self, client: requests_http.Session, security_client: requests_http.Session, server_url: str, language: str, sdk_version: str, gen_version: str) -> None:
17-
self._client = client
18-
self._security_client = security_client
19-
self._server_url = server_url
20-
self._language = language
21-
self._sdk_version = sdk_version
22-
self._gen_version = gen_version
11+
def __init__(self, sdk_config: SDKConfiguration) -> None:
12+
self.sdk_configuration = sdk_config
2313

2414

2515
def create_connection(self, request: shared.ConnectionCreateRequest) -> operations.CreateConnectionResponse:
2616
r"""Create a connection"""
27-
base_url = self._server_url
17+
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
2818

29-
url = base_url.removesuffix('/') + '/connections'
19+
url = base_url + '/connections'
3020
headers = {}
3121
req_content_type, data, form = utils.serialize_request_body(request, "request", 'json')
3222
if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
3323
headers['content-type'] = req_content_type
3424
if data is None and form is None:
3525
raise Exception('request body is required')
3626
headers['Accept'] = 'application/json'
37-
headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}'
27+
headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version}'
3828

39-
client = self._security_client
29+
client = self.sdk_configuration.security_client
4030

4131
http_res = client.request('POST', url, data=data, files=form, headers=headers)
4232
content_type = http_res.headers.get('Content-Type')
@@ -55,14 +45,14 @@ def create_connection(self, request: shared.ConnectionCreateRequest) -> operatio
5545

5646
def delete_connection(self, request: operations.DeleteConnectionRequest) -> operations.DeleteConnectionResponse:
5747
r"""Delete a Connection"""
58-
base_url = self._server_url
48+
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
5949

6050
url = utils.generate_url(operations.DeleteConnectionRequest, base_url, '/connections/{connectionId}', request)
6151
headers = {}
6252
headers['Accept'] = '*/*'
63-
headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}'
53+
headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version}'
6454

65-
client = self._security_client
55+
client = self.sdk_configuration.security_client
6656

6757
http_res = client.request('DELETE', url, headers=headers)
6858
content_type = http_res.headers.get('Content-Type')
@@ -75,14 +65,14 @@ def delete_connection(self, request: operations.DeleteConnectionRequest) -> oper
7565

7666
def get_connection(self, request: operations.GetConnectionRequest) -> operations.GetConnectionResponse:
7767
r"""Get Connection details"""
78-
base_url = self._server_url
68+
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
7969

8070
url = utils.generate_url(operations.GetConnectionRequest, base_url, '/connections/{connectionId}', request)
8171
headers = {}
8272
headers['Accept'] = 'application/json'
83-
headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}'
73+
headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version}'
8474

85-
client = self._security_client
75+
client = self.sdk_configuration.security_client
8676

8777
http_res = client.request('GET', url, headers=headers)
8878
content_type = http_res.headers.get('Content-Type')
@@ -101,15 +91,15 @@ def get_connection(self, request: operations.GetConnectionRequest) -> operations
10191

10292
def list_connections(self, request: operations.ListConnectionsRequest) -> operations.ListConnectionsResponse:
10393
r"""List connections"""
104-
base_url = self._server_url
94+
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
10595

106-
url = base_url.removesuffix('/') + '/connections'
96+
url = base_url + '/connections'
10797
headers = {}
10898
query_params = utils.get_query_params(operations.ListConnectionsRequest, request)
10999
headers['Accept'] = 'application/json'
110-
headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}'
100+
headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version}'
111101

112-
client = self._security_client
102+
client = self.sdk_configuration.security_client
113103

114104
http_res = client.request('GET', url, params=query_params, headers=headers)
115105
content_type = http_res.headers.get('Content-Type')

src/airbyte/destinations.py

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,32 @@
11
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
22

3-
import requests as requests_http
4-
from . import utils
3+
from .sdkconfiguration import SDKConfiguration
4+
from airbyte import utils
55
from airbyte.models import operations, shared
66
from typing import Optional
77

88
class Destinations:
9-
_client: requests_http.Session
10-
_security_client: requests_http.Session
11-
_server_url: str
12-
_language: str
13-
_sdk_version: str
14-
_gen_version: str
9+
sdk_configuration: SDKConfiguration
1510

16-
def __init__(self, client: requests_http.Session, security_client: requests_http.Session, server_url: str, language: str, sdk_version: str, gen_version: str) -> None:
17-
self._client = client
18-
self._security_client = security_client
19-
self._server_url = server_url
20-
self._language = language
21-
self._sdk_version = sdk_version
22-
self._gen_version = gen_version
11+
def __init__(self, sdk_config: SDKConfiguration) -> None:
12+
self.sdk_configuration = sdk_config
2313

2414

2515
def create_destination(self, request: shared.DestinationCreateRequest) -> operations.CreateDestinationResponse:
2616
r"""Create a destination
2717
Creates a destination given a name, workspace id, and a json blob containing the configuration for the source.
2818
"""
29-
base_url = self._server_url
19+
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
3020

31-
url = base_url.removesuffix('/') + '/destinations'
21+
url = base_url + '/destinations'
3222
headers = {}
3323
req_content_type, data, form = utils.serialize_request_body(request, "request", 'json')
3424
if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
3525
headers['content-type'] = req_content_type
3626
headers['Accept'] = 'application/json'
37-
headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}'
27+
headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version}'
3828

39-
client = self._security_client
29+
client = self.sdk_configuration.security_client
4030

4131
http_res = client.request('POST', url, data=data, files=form, headers=headers)
4232
content_type = http_res.headers.get('Content-Type')
@@ -55,14 +45,14 @@ def create_destination(self, request: shared.DestinationCreateRequest) -> operat
5545

5646
def delete_destination(self, request: operations.DeleteDestinationRequest) -> operations.DeleteDestinationResponse:
5747
r"""Delete a Destination"""
58-
base_url = self._server_url
48+
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
5949

6050
url = utils.generate_url(operations.DeleteDestinationRequest, base_url, '/destinations/{destinationId}', request)
6151
headers = {}
6252
headers['Accept'] = '*/*'
63-
headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}'
53+
headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version}'
6454

65-
client = self._security_client
55+
client = self.sdk_configuration.security_client
6656

6757
http_res = client.request('DELETE', url, headers=headers)
6858
content_type = http_res.headers.get('Content-Type')
@@ -75,14 +65,14 @@ def delete_destination(self, request: operations.DeleteDestinationRequest) -> op
7565

7666
def get_destination(self, request: operations.GetDestinationRequest) -> operations.GetDestinationResponse:
7767
r"""Get Destination details"""
78-
base_url = self._server_url
68+
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
7969

8070
url = utils.generate_url(operations.GetDestinationRequest, base_url, '/destinations/{destinationId}', request)
8171
headers = {}
8272
headers['Accept'] = 'application/json'
83-
headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}'
73+
headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version}'
8474

85-
client = self._security_client
75+
client = self.sdk_configuration.security_client
8676

8777
http_res = client.request('GET', url, headers=headers)
8878
content_type = http_res.headers.get('Content-Type')
@@ -101,15 +91,15 @@ def get_destination(self, request: operations.GetDestinationRequest) -> operatio
10191

10292
def list_destinations(self, request: operations.ListDestinationsRequest) -> operations.ListDestinationsResponse:
10393
r"""List destinations"""
104-
base_url = self._server_url
94+
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
10595

106-
url = base_url.removesuffix('/') + '/destinations'
96+
url = base_url + '/destinations'
10797
headers = {}
10898
query_params = utils.get_query_params(operations.ListDestinationsRequest, request)
10999
headers['Accept'] = 'application/json'
110-
headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}'
100+
headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version}'
111101

112-
client = self._security_client
102+
client = self.sdk_configuration.security_client
113103

114104
http_res = client.request('GET', url, params=query_params, headers=headers)
115105
content_type = http_res.headers.get('Content-Type')

0 commit comments

Comments
 (0)