Skip to content

Commit

Permalink
Merge pull request #6 from fabra-io/speakeasy-sdk-regen-1678140113
Browse files Browse the repository at this point in the history
chore: speakeasy sdk regeneration - Generate
  • Loading branch information
nfiacco authored Mar 6, 2023
2 parents 1a0eaf1 + c425d80 commit 7e9ca5c
Show file tree
Hide file tree
Showing 29 changed files with 195 additions and 65 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ if res.get_namespaces_200_application_json_object is not None:
* `create_destination` - Create a new destination
* `get_destinations` - Get all destinations

### link_token

* `create_link_token` - Create a new link token

### object

* `create_object` - Create a new object
Expand Down
10 changes: 9 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,12 @@ Based on:
- OpenAPI Doc 0.1.0 ./openapi.yaml
- Speakeasy CLI 1.8.4 https://github.com/speakeasy-api/speakeasy
### Releases
- [PyPI v0.5.1] https://pypi.org/project/fabra/0.5.1 - ./
- [PyPI v0.5.1] https://pypi.org/project/fabra/0.5.1 - ./

## 2023-03-06 22:01:52
### Changes
Based on:
- OpenAPI Doc 0.1.0 https://fabra-io.github.io/docs/openapi.yaml
- Speakeasy CLI 1.8.5 https://github.com/speakeasy-api/speakeasy
### Releases
- [PyPI v0.5.2] https://pypi.org/project/fabra/0.5.2 - .
4 changes: 4 additions & 0 deletions files.gen
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
src/fabra/connection.py
src/fabra/destination.py
src/fabra/link_token.py
src/fabra/object.py
src/fabra/source.py
src/fabra/sync.py
Expand All @@ -16,6 +17,7 @@ src/fabra/models/operations/get_schema.py
src/fabra/models/operations/get_tables.py
src/fabra/models/operations/create_destination.py
src/fabra/models/operations/get_destinations.py
src/fabra/models/operations/create_link_token.py
src/fabra/models/operations/create_object.py
src/fabra/models/operations/get_objects.py
src/fabra/models/operations/create_source.py
Expand All @@ -33,6 +35,8 @@ src/fabra/models/shared/snowflakeconfig.py
src/fabra/models/shared/redshiftconfig.py
src/fabra/models/shared/mongodbconfig.py
src/fabra/models/shared/bigqueryconfig.py
src/fabra/models/shared/createlinktokenresponse.py
src/fabra/models/shared/createlinktokenrequest.py
src/fabra/models/shared/object.py
src/fabra/models/shared/objectfield.py
src/fabra/models/shared/objectinput.py
Expand Down
19 changes: 10 additions & 9 deletions gen.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
configVersion: 1.0.0
management:
docChecksum: 5bdbad96d6d347d81789110337cf504a
docVersion: 0.1.0
speakeasyVersion: 1.8.4
docChecksum: 8b6e699ac2ed042ca62a8341762bfe53
docVersion: 0.1.0
speakeasyVersion: 1.8.5
generation:
telemetryEnabled: false
sdkClassName: Fabra
telemetryEnabled: false
sdkClassName: Fabra
sdkFlattening: false
python:
version: 0.5.1
author: fabra
description: Python Client SDK Generated by Speakeasy
packageName: fabra
version: 0.5.2
author: fabra
description: Python Client SDK Generated by Speakeasy
packageName: fabra
3 changes: 2 additions & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ good-names=i,
k,
ex,
Run,
_
_,
id

# Good variable names regexes, separated by a comma. If names match any regex,
# they will always be accepted
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setuptools.setup(
name="fabra",
version="0.5.1",
version="0.5.2",
author="fabra",
description="Python Client SDK Generated by Speakeasy",
long_description=long_description,
Expand Down
8 changes: 4 additions & 4 deletions src/fabra/connection.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import requests
import requests as requests_http
from . import utils
from fabra.models import operations
from typing import Optional

class Connection:
_client: requests.Session
_security_client: requests.Session
_client: requests_http.Session
_security_client: requests_http.Session
_server_url: str
_language: str
_sdk_version: str
_gen_version: str

def __init__(self, client: requests.Session, security_client: requests.Session, server_url: str, language: str, sdk_version: str, gen_version: str) -> None:
def __init__(self, client: requests_http.Session, security_client: requests_http.Session, server_url: str, language: str, sdk_version: str, gen_version: str) -> None:
self._client = client
self._security_client = security_client
self._server_url = server_url
Expand Down
8 changes: 4 additions & 4 deletions src/fabra/destination.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import requests
import requests as requests_http
from . import utils
from fabra.models import operations
from typing import Optional

class Destination:
_client: requests.Session
_security_client: requests.Session
_client: requests_http.Session
_security_client: requests_http.Session
_server_url: str
_language: str
_sdk_version: str
_gen_version: str

def __init__(self, client: requests.Session, security_client: requests.Session, server_url: str, language: str, sdk_version: str, gen_version: str) -> None:
def __init__(self, client: requests_http.Session, security_client: requests_http.Session, server_url: str, language: str, sdk_version: str, gen_version: str) -> None:
self._client = client
self._security_client = security_client
self._server_url = server_url
Expand Down
55 changes: 55 additions & 0 deletions src/fabra/link_token.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import requests as requests_http
from . import utils
from fabra.models import operations, shared
from typing import Optional

class LinkToken:
_client: requests_http.Session
_security_client: requests_http.Session
_server_url: str
_language: str
_sdk_version: str
_gen_version: str

def __init__(self, client: requests_http.Session, security_client: requests_http.Session, server_url: str, language: str, sdk_version: str, gen_version: str) -> None:
self._client = client
self._security_client = security_client
self._server_url = server_url
self._language = language
self._sdk_version = sdk_version
self._gen_version = gen_version

def create_link_token(self, request: operations.CreateLinkTokenRequest) -> operations.CreateLinkTokenResponse:
r"""Create a new link token
"""

base_url = self._server_url

url = base_url.removesuffix('/') + '/link_token'

headers = {}
req_content_type, data, form = utils.serialize_request_body(request)
if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
headers['content-type'] = req_content_type
if data is None and form is None:
raise Exception('request body is required')

client = self._security_client

http_res = client.request('POST', url, data=data, files=form, headers=headers)
content_type = http_res.headers.get('Content-Type')

res = operations.CreateLinkTokenResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)

if http_res.status_code == 200:
if utils.match_content_type(content_type, 'application/json'):
out = utils.unmarshal_json(http_res.text, Optional[shared.CreateLinkTokenResponse])
res.create_link_token_response = out
elif http_res.status_code == 401:
pass
elif http_res.status_code == 500:
pass

return res


3 changes: 2 additions & 1 deletion src/fabra/models/operations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .create_destination import *
from .create_link_token import *
from .create_object import *
from .create_source import *
from .create_sync import *
Expand All @@ -10,4 +11,4 @@
from .get_syncs import *
from .get_tables import *

__all__ = ["CreateDestination200ApplicationJSON","CreateDestinationRequest","CreateDestinationResponse","CreateObject200ApplicationJSON","CreateObjectRequest","CreateObjectResponse","CreateSource200ApplicationJSON","CreateSourceRequest","CreateSourceResponse","CreateSync200ApplicationJSON","CreateSyncRequest","CreateSyncResponse","GetDestinations200ApplicationJSON","GetDestinationsResponse","GetNamespaces200ApplicationJSON","GetNamespacesQueryParams","GetNamespacesRequest","GetNamespacesResponse","GetObjects200ApplicationJSON","GetObjectsResponse","GetSchema200ApplicationJSON","GetSchemaQueryParams","GetSchemaRequest","GetSchemaResponse","GetSources200ApplicationJSON","GetSourcesResponse","GetSyncs200ApplicationJSON","GetSyncsResponse","GetTables200ApplicationJSON","GetTablesQueryParams","GetTablesRequest","GetTablesResponse"]
__all__ = ["CreateDestination200ApplicationJSON","CreateDestinationRequest","CreateDestinationResponse","CreateLinkTokenRequest","CreateLinkTokenResponse","CreateObject200ApplicationJSON","CreateObjectRequest","CreateObjectResponse","CreateSource200ApplicationJSON","CreateSourceRequest","CreateSourceResponse","CreateSync200ApplicationJSON","CreateSyncRequest","CreateSyncResponse","GetDestinations200ApplicationJSON","GetDestinationsResponse","GetNamespaces200ApplicationJSON","GetNamespacesQueryParams","GetNamespacesRequest","GetNamespacesResponse","GetObjects200ApplicationJSON","GetObjectsResponse","GetSchema200ApplicationJSON","GetSchemaQueryParams","GetSchemaRequest","GetSchemaResponse","GetSources200ApplicationJSON","GetSourcesResponse","GetSyncs200ApplicationJSON","GetSyncsResponse","GetTables200ApplicationJSON","GetTablesQueryParams","GetTablesRequest","GetTablesResponse"]
4 changes: 2 additions & 2 deletions src/fabra/models/operations/create_destination.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations
import dataclasses
import requests
import requests as requests_http
from ..shared import destination as shared_destination
from ..shared import destinationinput as shared_destinationinput
from dataclasses_json import Undefined, dataclass_json
Expand All @@ -24,5 +24,5 @@ class CreateDestinationResponse:
content_type: str = dataclasses.field()
status_code: int = dataclasses.field()
create_destination_200_application_json_object: Optional[CreateDestination200ApplicationJSON] = dataclasses.field(default=None)
raw_response: Optional[requests.Response] = dataclasses.field(default=None)
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)

20 changes: 20 additions & 0 deletions src/fabra/models/operations/create_link_token.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from __future__ import annotations
import dataclasses
import requests as requests_http
from ..shared import createlinktokenrequest as shared_createlinktokenrequest
from ..shared import createlinktokenresponse as shared_createlinktokenresponse
from typing import Optional


@dataclasses.dataclass
class CreateLinkTokenRequest:
request: shared_createlinktokenrequest.CreateLinkTokenRequest = dataclasses.field(metadata={'request': { 'media_type': 'application/json' }})


@dataclasses.dataclass
class CreateLinkTokenResponse:
content_type: str = dataclasses.field()
status_code: int = dataclasses.field()
create_link_token_response: Optional[shared_createlinktokenresponse.CreateLinkTokenResponse] = dataclasses.field(default=None)
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)

4 changes: 2 additions & 2 deletions src/fabra/models/operations/create_object.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations
import dataclasses
import requests
import requests as requests_http
from ..shared import object as shared_object
from ..shared import objectinput as shared_objectinput
from dataclasses_json import Undefined, dataclass_json
Expand All @@ -24,5 +24,5 @@ class CreateObjectResponse:
content_type: str = dataclasses.field()
status_code: int = dataclasses.field()
create_object_200_application_json_object: Optional[CreateObject200ApplicationJSON] = dataclasses.field(default=None)
raw_response: Optional[requests.Response] = dataclasses.field(default=None)
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)

4 changes: 2 additions & 2 deletions src/fabra/models/operations/create_source.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations
import dataclasses
import requests
import requests as requests_http
from ..shared import source as shared_source
from ..shared import sourceinput as shared_sourceinput
from dataclasses_json import Undefined, dataclass_json
Expand All @@ -24,5 +24,5 @@ class CreateSourceResponse:
content_type: str = dataclasses.field()
status_code: int = dataclasses.field()
create_source_200_application_json_object: Optional[CreateSource200ApplicationJSON] = dataclasses.field(default=None)
raw_response: Optional[requests.Response] = dataclasses.field(default=None)
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)

4 changes: 2 additions & 2 deletions src/fabra/models/operations/create_sync.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations
import dataclasses
import requests
import requests as requests_http
from ..shared import sync as shared_sync
from ..shared import syncinput as shared_syncinput
from dataclasses_json import Undefined, dataclass_json
Expand All @@ -24,5 +24,5 @@ class CreateSyncResponse:
content_type: str = dataclasses.field()
status_code: int = dataclasses.field()
create_sync_200_application_json_object: Optional[CreateSync200ApplicationJSON] = dataclasses.field(default=None)
raw_response: Optional[requests.Response] = dataclasses.field(default=None)
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)

4 changes: 2 additions & 2 deletions src/fabra/models/operations/get_destinations.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations
import dataclasses
import requests
import requests as requests_http
from ..shared import destination as shared_destination
from dataclasses_json import Undefined, dataclass_json
from fabra import utils
Expand All @@ -18,5 +18,5 @@ class GetDestinationsResponse:
content_type: str = dataclasses.field()
status_code: int = dataclasses.field()
get_destinations_200_application_json_object: Optional[GetDestinations200ApplicationJSON] = dataclasses.field(default=None)
raw_response: Optional[requests.Response] = dataclasses.field(default=None)
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)

4 changes: 2 additions & 2 deletions src/fabra/models/operations/get_namespaces.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations
import dataclasses
import requests
import requests as requests_http
from dataclasses_json import Undefined, dataclass_json
from fabra import utils
from typing import Optional
Expand All @@ -27,5 +27,5 @@ class GetNamespacesResponse:
content_type: str = dataclasses.field()
status_code: int = dataclasses.field()
get_namespaces_200_application_json_object: Optional[GetNamespaces200ApplicationJSON] = dataclasses.field(default=None)
raw_response: Optional[requests.Response] = dataclasses.field(default=None)
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)

4 changes: 2 additions & 2 deletions src/fabra/models/operations/get_objects.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations
import dataclasses
import requests
import requests as requests_http
from ..shared import object as shared_object
from dataclasses_json import Undefined, dataclass_json
from fabra import utils
Expand All @@ -18,5 +18,5 @@ class GetObjectsResponse:
content_type: str = dataclasses.field()
status_code: int = dataclasses.field()
get_objects_200_application_json_object: Optional[GetObjects200ApplicationJSON] = dataclasses.field(default=None)
raw_response: Optional[requests.Response] = dataclasses.field(default=None)
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)

6 changes: 3 additions & 3 deletions src/fabra/models/operations/get_schema.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations
import dataclasses
import requests
import requests as requests_http
from ..shared import columnschema as shared_columnschema
from dataclasses_json import Undefined, dataclass_json
from fabra import utils
Expand All @@ -11,7 +11,7 @@
class GetSchemaQueryParams:
connection_id: int = dataclasses.field(metadata={'query_param': { 'field_name': 'connectionID', 'style': 'form', 'explode': True }})
namespace: str = dataclasses.field(metadata={'query_param': { 'field_name': 'namespace', 'style': 'form', 'explode': True }})
table_name: str = dataclasses.field(metadata={'query_param': { 'field_name': 'table_name', 'style': 'form', 'explode': True }})
table_name: str = dataclasses.field(metadata={'query_param': { 'field_name': 'tableName', 'style': 'form', 'explode': True }})


@dataclasses.dataclass
Expand All @@ -30,5 +30,5 @@ class GetSchemaResponse:
content_type: str = dataclasses.field()
status_code: int = dataclasses.field()
get_schema_200_application_json_object: Optional[GetSchema200ApplicationJSON] = dataclasses.field(default=None)
raw_response: Optional[requests.Response] = dataclasses.field(default=None)
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)

4 changes: 2 additions & 2 deletions src/fabra/models/operations/get_sources.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations
import dataclasses
import requests
import requests as requests_http
from ..shared import source as shared_source
from dataclasses_json import Undefined, dataclass_json
from fabra import utils
Expand All @@ -18,5 +18,5 @@ class GetSourcesResponse:
content_type: str = dataclasses.field()
status_code: int = dataclasses.field()
get_sources_200_application_json_object: Optional[GetSources200ApplicationJSON] = dataclasses.field(default=None)
raw_response: Optional[requests.Response] = dataclasses.field(default=None)
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)

4 changes: 2 additions & 2 deletions src/fabra/models/operations/get_syncs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations
import dataclasses
import requests
import requests as requests_http
from ..shared import sync as shared_sync
from dataclasses_json import Undefined, dataclass_json
from fabra import utils
Expand All @@ -18,5 +18,5 @@ class GetSyncsResponse:
content_type: str = dataclasses.field()
status_code: int = dataclasses.field()
get_syncs_200_application_json_object: Optional[GetSyncs200ApplicationJSON] = dataclasses.field(default=None)
raw_response: Optional[requests.Response] = dataclasses.field(default=None)
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)

Loading

0 comments on commit 7e9ca5c

Please sign in to comment.