Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: 🐝 Update SDK - Generate #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This allows generated code to be indexed correctly
*.py linguist-generated=false
151 changes: 151 additions & 0 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
lockVersion: 2.0.0
id: b892e902-ce38-4137-8ad9-f24b4405401c
management:
docChecksum: a08d8b55b00bfb4ba4828a322fd16614
docVersion: 0.1.0
speakeasyVersion: 1.296.1
generationVersion: 2.338.1
releaseVersion: 0.22.0
configChecksum: 5084fe258dff39a930b76574b13b3a38
repoURL: https://github.com/fabra-io/python-sdk.git
repoSubDirectory: .
installationURL: https://github.com/fabra-io/python-sdk.git
published: true
features:
python:
additionalDependencies: 0.1.0
core: 4.6.8
globalSecurity: 2.83.5
globalSecurityCallbacks: 0.1.0
globalSecurityFlattening: 0.1.0
globalServerURLs: 2.82.2
responseFormat: 0.1.0
sdkHooks: 0.1.0
generatedFiles:
- src/fabra/sdkconfiguration.py
- src/fabra/connection.py
- src/fabra/customer_data.py
- src/fabra/destination.py
- src/fabra/link_token.py
- src/fabra/object.py
- src/fabra/source.py
- src/fabra/sync.py
- src/fabra/sdk.py
- py.typed
- pylintrc
- setup.py
- src/fabra/__init__.py
- src/fabra/utils/__init__.py
- src/fabra/utils/retries.py
- src/fabra/utils/utils.py
- src/fabra/models/errors/sdkerror.py
- src/fabra/models/operations/get_namespaces.py
- src/fabra/models/operations/get_schema.py
- src/fabra/models/operations/get_tables.py
- src/fabra/models/operations/query_object.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
- src/fabra/models/operations/get_sources.py
- src/fabra/models/operations/create_sync.py
- src/fabra/models/operations/get_syncs.py
- src/fabra/models/components/namespaces.py
- src/fabra/models/components/httpmetadata.py
- src/fabra/models/components/field.py
- src/fabra/models/components/fieldtype.py
- src/fabra/models/components/queryfilter.py
- src/fabra/models/components/destination.py
- src/fabra/models/components/connection.py
- src/fabra/models/components/connectiontype.py
- src/fabra/models/components/destinationinput.py
- src/fabra/models/components/snowflakeconfig.py
- src/fabra/models/components/redshiftconfig.py
- src/fabra/models/components/mongodbconfig.py
- src/fabra/models/components/bigqueryconfig.py
- src/fabra/models/components/createlinktokenresponse.py
- src/fabra/models/components/createlinktokenrequest.py
- src/fabra/models/components/object.py
- src/fabra/models/components/objectfield.py
- src/fabra/models/components/objectinput.py
- src/fabra/models/components/frequencyunits.py
- src/fabra/models/components/source.py
- src/fabra/models/components/sourceinput.py
- src/fabra/models/components/sync.py
- src/fabra/models/components/fieldmapping.py
- src/fabra/models/components/syncinput.py
- src/fabra/models/components/security.py
- src/fabra/models/__init__.py
- src/fabra/models/errors/__init__.py
- src/fabra/models/operations/__init__.py
- src/fabra/models/components/__init__.py
- docs/models/operations/getnamespacesrequest.md
- docs/models/operations/getnamespacesresponse.md
- docs/models/operations/getschemarequest.md
- docs/models/operations/getschemaresponsebody.md
- docs/models/operations/getschemaresponse.md
- docs/models/operations/gettablesrequest.md
- docs/models/operations/gettablesresponsebody.md
- docs/models/operations/gettablesresponse.md
- docs/models/operations/queryobjectrequestbody.md
- docs/models/operations/queryobjectrequest.md
- docs/models/operations/examplefield3.md
- docs/models/operations/queryobjectresponsebody.md
- docs/models/operations/queryobjectresponse.md
- docs/models/operations/createdestinationresponsebody.md
- docs/models/operations/createdestinationresponse.md
- docs/models/operations/getdestinationsresponsebody.md
- docs/models/operations/getdestinationsresponse.md
- docs/models/operations/createlinktokenresponse.md
- docs/models/operations/createobjectresponsebody.md
- docs/models/operations/createobjectresponse.md
- docs/models/operations/getobjectsresponsebody.md
- docs/models/operations/getobjectsresponse.md
- docs/models/operations/createsourceresponsebody.md
- docs/models/operations/createsourceresponse.md
- docs/models/operations/getsourcesresponsebody.md
- docs/models/operations/getsourcesresponse.md
- docs/models/operations/createsyncresponsebody.md
- docs/models/operations/createsyncresponse.md
- docs/models/operations/getsyncsresponsebody.md
- docs/models/operations/getsyncsresponse.md
- docs/models/components/namespaces.md
- docs/models/components/httpmetadata.md
- docs/models/components/field.md
- docs/models/components/fieldtype.md
- docs/models/components/queryfilter.md
- docs/models/components/destination.md
- docs/models/components/connection.md
- docs/models/components/connectiontype.md
- docs/models/components/destinationinput.md
- docs/models/components/snowflakeconfig.md
- docs/models/components/redshiftconfig.md
- docs/models/components/mongodbconfig.md
- docs/models/components/bigqueryconfig.md
- docs/models/components/createlinktokenresponse.md
- docs/models/components/createlinktokenrequest.md
- docs/models/components/object.md
- docs/models/components/objectfield.md
- docs/models/components/objectinput.md
- docs/models/components/frequencyunits.md
- docs/models/components/source.md
- docs/models/components/sourceinput.md
- docs/models/components/sync.md
- docs/models/components/fieldmapping.md
- docs/models/components/syncinput.md
- docs/models/components/security.md
- docs/sdks/fabra/README.md
- docs/sdks/connection/README.md
- docs/sdks/customerdata/README.md
- docs/sdks/destination/README.md
- docs/sdks/linktoken/README.md
- docs/sdks/object/README.md
- docs/sdks/source/README.md
- docs/sdks/sync/README.md
- USAGE.md
- .gitattributes
- src/fabra/_hooks/sdkhooks.py
- src/fabra/_hooks/types.py
- src/fabra/_hooks/__init__.py
175 changes: 161 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,42 @@
<a href="https://www.fabra.io/#Email-Hero"><img src="https://img.shields.io/static/v1?label=Docs&message=Sign Up&color=2ca47c&style=for-the-badge" /></a>
</div>

<!-- Start SDK Installation -->
<!-- Start SDK Installation [installation] -->
## SDK Installation

```bash
pip install fabra
```
<!-- End SDK Installation -->
<!-- End SDK Installation [installation] -->

<!-- Start SDK Example Usage [usage] -->
## SDK Example Usage
<!-- Start SDK Example Usage -->

### Example

```python
import fabra
from fabra.models import operations

s = fabra.Fabra(
security=shared.Security(
api_key_auth="",
),
api_key_auth="<YOUR_API_KEY_HERE>",
)

req = operations.GetNamespacesRequest(
connection_id=548814,
)

res = s.connection.get_namespaces(req)
res = s.connection.get_namespaces(request=operations.GetNamespacesRequest(
connection_id=995455,
))

if res.namespaces is not None:
# handle response
pass

```
<!-- End SDK Example Usage -->
<!-- End SDK Example Usage [usage] -->

<!-- Start SDK Available Operations -->
<!-- Start Available Resources and Operations [operations] -->
## Available Resources and Operations


### [connection](docs/sdks/connection/README.md)

* [get_namespaces](docs/sdks/connection/README.md#get_namespaces) - Get all namespaces
Expand Down Expand Up @@ -74,6 +75,152 @@ if res.namespaces is not None:

* [create_sync](docs/sdks/sync/README.md#create_sync) - Create a new sync
* [get_syncs](docs/sdks/sync/README.md#get_syncs) - Get all syncs
<!-- End SDK Available Operations -->
<!-- End Available Resources and Operations [operations] -->

<!-- Start Error Handling [errors] -->
## Error Handling

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.

| Error Object | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| errors.SDKError | 4xx-5xx | */* |

### Example

```python
import fabra
from fabra.models import errors, operations

s = fabra.Fabra(
api_key_auth="<YOUR_API_KEY_HERE>",
)

res = None
try:
res = s.connection.get_namespaces(request=operations.GetNamespacesRequest(
connection_id=995455,
))

except errors.SDKError as e:
# handle exception
raise(e)

if res.namespaces is not None:
# handle response
pass

```
<!-- End Error Handling [errors] -->

<!-- Start Server Selection [server] -->
## Server Selection

### Select Server by Index

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:

| # | Server | Variables |
| - | ------ | --------- |
| 0 | `https://api.fabra.io` | None |

#### Example

```python
import fabra
from fabra.models import operations

s = fabra.Fabra(
server_idx=0,
api_key_auth="<YOUR_API_KEY_HERE>",
)


res = s.connection.get_namespaces(request=operations.GetNamespacesRequest(
connection_id=995455,
))

if res.namespaces is not None:
# handle response
pass

```


### Override Server URL Per-Client

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:
```python
import fabra
from fabra.models import operations

s = fabra.Fabra(
server_url="https://api.fabra.io",
api_key_auth="<YOUR_API_KEY_HERE>",
)


res = s.connection.get_namespaces(request=operations.GetNamespacesRequest(
connection_id=995455,
))

if res.namespaces is not None:
# handle response
pass

```
<!-- End Server Selection [server] -->

<!-- Start Custom HTTP Client [http-client] -->
## Custom HTTP Client

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.

For example, you could specify a header for every request that this sdk makes as follows:
```python
import fabra
import requests

http_client = requests.Session()
http_client.headers.update({'x-custom-header': 'someValue'})
s = fabra.Fabra(client=http_client)
```
<!-- End Custom HTTP Client [http-client] -->

<!-- Start Authentication [security] -->
## Authentication

### Per-Client Security Schemes

This SDK supports the following security scheme globally:

| Name | Type | Scheme |
| -------------- | -------------- | -------------- |
| `api_key_auth` | apiKey | API key |

To authenticate with the API the `api_key_auth` parameter must be set when initializing the SDK client instance. For example:
```python
import fabra
from fabra.models import operations

s = fabra.Fabra(
api_key_auth="<YOUR_API_KEY_HERE>",
)


res = s.connection.get_namespaces(request=operations.GetNamespacesRequest(
connection_id=995455,
))

if res.namespaces is not None:
# handle response
pass

```
<!-- End Authentication [security] -->

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



### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,4 +354,14 @@ Based on:
- OpenAPI Doc 0.1.0 https://fabra-io.github.io/docs/openapi.yaml
- Speakeasy CLI 1.49.0 (2.41.4) https://github.com/speakeasy-api/speakeasy
### Releases
- [PyPI v0.21.0] https://pypi.org/project/fabra/0.21.0 - .
- [PyPI v0.21.0] https://pypi.org/project/fabra/0.21.0 - .

## 2024-05-29 00:07:04
### Changes
Based on:
- OpenAPI Doc 0.1.0 https://fabra-io.github.io/docs/openapi.yaml
- Speakeasy CLI 1.296.1 (2.338.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.22.0] .
### Releases
- [PyPI v0.22.0] https://pypi.org/project/fabra/0.22.0 - .
Loading