Skip to content

chore: 🐝 Update SDK - Generate #110

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

Merged
merged 1 commit into from
Jun 8, 2024
Merged
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
8 changes: 4 additions & 4 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ id: 8b5fa338-9106-4734-abf0-e30d67044a90
management:
docChecksum: 2cabb51a37782b691a9f16fbbf8df52b
docVersion: 1.0.33
speakeasyVersion: 1.300.0
generationVersion: 2.338.14
releaseVersion: 0.23.1
configChecksum: 1ff015a4f01b59b8410c220d105f05a2
speakeasyVersion: 1.300.1
generationVersion: 2.339.1
releaseVersion: 0.23.2
configChecksum: a468a45a33e1c1f49b439ef4ac9f9de9
repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git
repoSubDirectory: .
installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
speakeasyVersion: 1.300.0
speakeasyVersion: 1.300.1
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:9185f612fb7b29e3977b6a818d07a5e05274d149c2f1e5faef03980913817bd2
sourceBlobDigest: sha256:ca32fe0602b577603a80b173976350fddad466232f4b971f2b90ae2405ead69b
sourceRevisionDigest: sha256:2d784171c0d3cf861c9b0e03a73d0eb4e99bdd1dd73f59aaf11490110af5f4ac
sourceBlobDigest: sha256:9f004e6ecd506c665f6de41a3b5c6d6dc0918c0df0680808e6a218d9b86d24b8
tags:
- latest
- main
targets:
unstructured-python:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:9185f612fb7b29e3977b6a818d07a5e05274d149c2f1e5faef03980913817bd2
sourceBlobDigest: sha256:ca32fe0602b577603a80b173976350fddad466232f4b971f2b90ae2405ead69b
sourceRevisionDigest: sha256:2d784171c0d3cf861c9b0e03a73d0eb4e99bdd1dd73f59aaf11490110af5f4ac
sourceBlobDigest: sha256:9f004e6ecd506c665f6de41a3b5c6d6dc0918c0df0680808e6a218d9b86d24b8
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
Expand Down
63 changes: 61 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,67 @@ req = shared.PartitionParameters(
split_pdf_concurrency_level=8
)
```
<!-- Start Retries -->
<!-- End Retries -->
<!-- Start Retries [retries] -->
## Retries

Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
```python
import unstructured_client
from unstructured_client.models import operations, shared
from unstructured_client.utils import BackoffStrategy, RetryConfig

s = unstructured_client.UnstructuredClient(
api_key_auth="YOUR_API_KEY",
)


res = s.general.partition(request=operations.PartitionRequest(
partition_parameters=shared.PartitionParameters(
files=shared.Files(
content='0x2cC94b2FEF'.encode(),
file_name='your_file_here',
),
strategy=shared.Strategy.AUTO,
),
),
RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False))

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

```

If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
```python
import unstructured_client
from unstructured_client.models import operations, shared
from unstructured_client.utils import BackoffStrategy, RetryConfig

s = unstructured_client.UnstructuredClient(
retry_config=RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False),
api_key_auth="YOUR_API_KEY",
)


res = s.general.partition(request=operations.PartitionRequest(
partition_parameters=shared.PartitionParameters(
files=shared.Files(
content='0x2cC94b2FEF'.encode(),
file_name='your_file_here',
),
strategy=shared.Strategy.AUTO,
),
))

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

```
<!-- End Retries [retries] -->

<!-- Start Custom HTTP Client [http-client] -->
## Custom HTTP Client
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -494,4 +494,14 @@ Based on:
### Generated
- [python v0.23.1] .
### Releases
- [PyPI v0.23.1] https://pypi.org/project/unstructured-client/0.23.1 - .
- [PyPI v0.23.1] https://pypi.org/project/unstructured-client/0.23.1 - .

## 2024-06-08 00:46:23
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.300.1 (2.339.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.23.2] .
### Releases
- [PyPI v0.23.2] https://pypi.org/project/unstructured-client/0.23.2 - .
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
python:
version: 0.23.1
version: 0.23.2
additionalDependencies:
dependencies:
deepdiff: '>=6.0'
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

setuptools.setup(
name='unstructured-client',
version='0.23.1',
version='0.23.2',
author='Unstructured',
description='Python Client SDK for Unstructured API',
license = 'MIT',
Expand Down
6 changes: 3 additions & 3 deletions src/unstructured_client/sdkconfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class SDKConfiguration:
server: Optional[str] = ''
language: str = 'python'
openapi_doc_version: str = '1.0.33'
sdk_version: str = '0.23.1'
gen_version: str = '2.338.14'
user_agent: str = 'speakeasy-sdk/python 0.23.1 2.338.14 1.0.33 unstructured-client'
sdk_version: str = '0.23.2'
gen_version: str = '2.339.1'
user_agent: str = 'speakeasy-sdk/python 0.23.2 2.339.1 1.0.33 unstructured-client'
retry_config: Optional[RetryConfig] = None

def __post_init__(self):
Expand Down