Skip to content

Commit a4bb0c4

Browse files
committed
ci: regenerated with OpenAPI Doc 0.1.0, Speakeay CLI 1.4.5
1 parent 71d81b4 commit a4bb0c4

Some content is hidden

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

50 files changed

+2201
-1
lines changed

README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# fabra
2+
3+
<!-- Start SDK Installation -->
4+
## SDK Installation
5+
6+
```bash
7+
pip install fabra
8+
```
9+
<!-- End SDK Installation -->
10+
11+
## SDK Example Usage
12+
<!-- Start SDK Example Usage -->
13+
```python
14+
import fabra
15+
from fabra.models import operations, shared
16+
17+
s = fabra.Fabra()
18+
s.config_security(
19+
security=shared.Security(
20+
api_key_auth=shared.SchemeAPIKeyAuth(
21+
api_key="YOUR_API_KEY_HERE",
22+
),
23+
)
24+
)
25+
26+
req = operations.GetNamespacesRequest(
27+
query_params=operations.GetNamespacesQueryParams(
28+
connection_id=548814,
29+
),
30+
)
31+
32+
res = s.connection.get_namespaces(req)
33+
34+
if res.get_namespaces_200_application_json_object is not None:
35+
# handle response
36+
```
37+
<!-- End SDK Example Usage -->
38+
39+
<!-- Start SDK Available Operations -->
40+
## SDK Available Operations
41+
42+
43+
### connection
44+
45+
* `get_namespaces` - Get all namespaces
46+
* `get_schema` - Get schema for table
47+
* `get_tables` - Get all tables
48+
49+
### destination
50+
51+
* `create_destination` - Create a new destination
52+
* `get_destinations` - Get all destinations
53+
54+
### object
55+
56+
* `create_object` - Create a new object
57+
* `get_objects` - Get all objects
58+
59+
### source
60+
61+
* `create_source` - Create a new source
62+
* `get_sources` - Get all sources
63+
64+
### sync
65+
66+
* `create_sync` - Create a new sync
67+
* `get_syncs` - Get all syncs
68+
<!-- End SDK Available Operations -->
69+
70+
### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)

RELEASES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
3+
## Version 0.1.0
4+
### Changes
5+
Based on:
6+
- OpenAPI Doc 0.1.0 ./openapi.yaml
7+
- Speakeasy CLI 1.4.5 https://github.com/speakeasy-api/speakeasy

USAGE.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!-- Start SDK Example Usage -->
2+
```python
3+
import fabra
4+
from fabra.models import operations, shared
5+
6+
s = fabra.Fabra()
7+
s.config_security(
8+
security=shared.Security(
9+
api_key_auth=shared.SchemeAPIKeyAuth(
10+
api_key="YOUR_API_KEY_HERE",
11+
),
12+
)
13+
)
14+
15+
req = operations.GetNamespacesRequest(
16+
query_params=operations.GetNamespacesQueryParams(
17+
connection_id=548814,
18+
),
19+
)
20+
21+
res = s.connection.get_namespaces(req)
22+
23+
if res.get_namespaces_200_application_json_object is not None:
24+
# handle response
25+
```
26+
<!-- End SDK Example Usage -->

files.gen

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
src/fabra/connection.py
2+
src/fabra/destination.py
3+
src/fabra/object.py
4+
src/fabra/source.py
5+
src/fabra/sync.py
6+
src/fabra/sdk.py
7+
setup.py
8+
src/fabra/__init__.py
9+
src/fabra/models/__init__.py
10+
src/fabra/utils/__init__.py
11+
src/fabra/utils/retries.py
12+
src/fabra/utils/utils.py
13+
src/fabra/models/operations/get_namespaces.py
14+
src/fabra/models/operations/get_schema.py
15+
src/fabra/models/operations/get_tables.py
16+
src/fabra/models/operations/create_destination.py
17+
src/fabra/models/operations/get_destinations.py
18+
src/fabra/models/operations/create_object.py
19+
src/fabra/models/operations/get_objects.py
20+
src/fabra/models/operations/create_source.py
21+
src/fabra/models/operations/get_sources.py
22+
src/fabra/models/operations/create_sync.py
23+
src/fabra/models/operations/get_syncs.py
24+
src/fabra/models/operations/__init__.py
25+
src/fabra/models/shared/columnschema.py
26+
src/fabra/models/shared/fieldtype_enum.py
27+
src/fabra/models/shared/destination.py
28+
src/fabra/models/shared/connection.py
29+
src/fabra/models/shared/connectiontype_enum.py
30+
src/fabra/models/shared/destinationinput.py
31+
src/fabra/models/shared/snowflakeconfig.py
32+
src/fabra/models/shared/redshiftconfig.py
33+
src/fabra/models/shared/mongodbconfig.py
34+
src/fabra/models/shared/bigqueryconfig.py
35+
src/fabra/models/shared/object.py
36+
src/fabra/models/shared/objectfield.py
37+
src/fabra/models/shared/objectinput.py
38+
src/fabra/models/shared/source.py
39+
src/fabra/models/shared/sourceinput.py
40+
src/fabra/models/shared/sync.py
41+
src/fabra/models/shared/frequencyunits_enum.py
42+
src/fabra/models/shared/fieldmapping.py
43+
src/fabra/models/shared/syncinput.py
44+
src/fabra/models/shared/security.py
45+
src/fabra/models/shared/__init__.py
46+
USAGE.md

gen.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
management:
2+
openapi-checksum: 5bdbad96d6d347d81789110337cf504a
3+
openapi-version: 0.1.0
4+
speakeasy-version: 1.4.5
15
python:
2-
version: 0.0.0
6+
version: 0.1.0
37
packagename: fabra
48
author: fabra
59
sdkclassname: Fabra

setup.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import setuptools
2+
3+
try:
4+
with open("README.md", "r") as fh:
5+
long_description = fh.read()
6+
except FileNotFoundError:
7+
long_description = ""
8+
9+
setuptools.setup(
10+
name="fabra",
11+
version="0.1.0",
12+
author="fabra",
13+
description="Python Client SDK Generated by Speakeasy",
14+
long_description=long_description,
15+
long_description_content_type="text/markdown",
16+
packages=setuptools.find_packages(where="src"),
17+
install_requires=[
18+
"certifi==2022.12.07",
19+
"charset-normalizer==2.1.1",
20+
"dacite==1.6.0",
21+
"dataclasses-json-speakeasy==0.5.8",
22+
"idna==3.3",
23+
"marshmallow==3.17.1",
24+
"marshmallow-enum==1.5.1",
25+
"mypy-extensions==0.4.3",
26+
"packaging==21.3",
27+
"pyparsing==3.0.9",
28+
"python-dateutil==2.8.2",
29+
"requests==2.28.1",
30+
"six==1.16.0",
31+
"typing-inspect==0.8.0",
32+
"typing_extensions==4.3.0",
33+
"urllib3==1.26.12",
34+
],
35+
package_dir={'': 'src'},
36+
python_requires='>=3.9'
37+
)

src/fabra/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .sdk import *

src/fabra/connection.py

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
import requests
2+
from . import utils
3+
from fabra.models import operations
4+
from typing import Optional
5+
6+
class Connection:
7+
_client: requests.Session
8+
_security_client: requests.Session
9+
_server_url: str
10+
_language: str
11+
_sdk_version: str
12+
_gen_version: str
13+
14+
def __init__(self, client: requests.Session, security_client: requests.Session, server_url: str, language: str, sdk_version: str, gen_version: str) -> None:
15+
self._client = client
16+
self._security_client = security_client
17+
self._server_url = server_url
18+
self._language = language
19+
self._sdk_version = sdk_version
20+
self._gen_version = gen_version
21+
22+
23+
def get_namespaces(self, request: operations.GetNamespacesRequest) -> operations.GetNamespacesResponse:
24+
r"""Get all namespaces
25+
"""
26+
27+
base_url = self._server_url
28+
29+
url = base_url.removesuffix("/") + "/connection/namespaces"
30+
31+
query_params = utils.get_query_params(request.query_params)
32+
33+
client = self._security_client
34+
35+
r = client.request("GET", url, params=query_params)
36+
content_type = r.headers.get("Content-Type")
37+
38+
res = operations.GetNamespacesResponse(status_code=r.status_code, content_type=content_type)
39+
40+
if r.status_code == 200:
41+
if utils.match_content_type(content_type, "application/json"):
42+
out = utils.unmarshal_json(r.text, Optional[operations.GetNamespaces200ApplicationJSON])
43+
res.get_namespaces_200_application_json_object = out
44+
elif r.status_code == 401:
45+
pass
46+
elif r.status_code == 500:
47+
pass
48+
49+
return res
50+
51+
52+
def get_schema(self, request: operations.GetSchemaRequest) -> operations.GetSchemaResponse:
53+
r"""Get schema for table
54+
"""
55+
56+
base_url = self._server_url
57+
58+
url = base_url.removesuffix("/") + "/connection/schema"
59+
60+
query_params = utils.get_query_params(request.query_params)
61+
62+
client = self._security_client
63+
64+
r = client.request("GET", url, params=query_params)
65+
content_type = r.headers.get("Content-Type")
66+
67+
res = operations.GetSchemaResponse(status_code=r.status_code, content_type=content_type)
68+
69+
if r.status_code == 200:
70+
if utils.match_content_type(content_type, "application/json"):
71+
out = utils.unmarshal_json(r.text, Optional[operations.GetSchema200ApplicationJSON])
72+
res.get_schema_200_application_json_object = out
73+
elif r.status_code == 401:
74+
pass
75+
elif r.status_code == 500:
76+
pass
77+
78+
return res
79+
80+
81+
def get_tables(self, request: operations.GetTablesRequest) -> operations.GetTablesResponse:
82+
r"""Get all tables
83+
"""
84+
85+
base_url = self._server_url
86+
87+
url = base_url.removesuffix("/") + "/connection/tables"
88+
89+
query_params = utils.get_query_params(request.query_params)
90+
91+
client = self._security_client
92+
93+
r = client.request("GET", url, params=query_params)
94+
content_type = r.headers.get("Content-Type")
95+
96+
res = operations.GetTablesResponse(status_code=r.status_code, content_type=content_type)
97+
98+
if r.status_code == 200:
99+
if utils.match_content_type(content_type, "application/json"):
100+
out = utils.unmarshal_json(r.text, Optional[operations.GetTables200ApplicationJSON])
101+
res.get_tables_200_application_json_object = out
102+
elif r.status_code == 401:
103+
pass
104+
elif r.status_code == 500:
105+
pass
106+
107+
return res
108+
109+

0 commit comments

Comments
 (0)