Skip to content

Commit ec4e3aa

Browse files
chore: 🐝 Update SDK - Generate 0.41.0 (#300)
> [!IMPORTANT] > Linting report available at: <https://app.speakeasy.com/org/unstructured/unstructured5xr/linting-report/2dce73368bb6e91d3ce8672cc3c3f3b3> > OpenAPI Change report available at: <https://app.speakeasy.com/org/unstructured/unstructured5xr/changes-report/176ed6a25c9581cb9376db90c0e11b81> # SDK update Based on: - OpenAPI Doc - Speakeasy CLI 1.589.0 (2.664.0) https://github.com/speakeasy-api/speakeasy ## Versioning Version Bump Type: [minor] - 🤖 (automated) ## OpenAPI Change Summary ``` ├─┬Info │ └──[🔀] version (18:16) ├─┬Paths │ ├──[➖] path (1:29015)❌ │ ├──[➕] path (1859:5) │ ├─┬/api/v1/workflows/{workflow_id} │ │ ├─┬GET │ │ │ └─┬Servers │ │ │ └──[➖] servers (1:25855)❌ │ │ ├─┬PUT │ │ │ └─┬Servers │ │ │ └──[➖] servers (1:26933)❌ │ │ └─┬DELETE │ │ └─┬Servers │ │ └──[➖] servers (1:27788)❌ │ ├─┬/api/v1/destinations/{destination_id}/connection-check │ │ ├─┬GET │ │ │ └─┬Servers │ │ │ └──[➖] servers (1:6473)❌ │ │ └─┬POST │ │ └─┬Servers │ │ └──[➖] servers (1:7527)❌ │ ├─┬/api/v1/destinations/ │ │ ├─┬GET │ │ │ └─┬Servers │ │ │ └──[➖] servers (1:1286)❌ │ │ └─┬POST │ │ └─┬Servers │ │ └──[➖] servers (1:2281)❌ │ ├─┬/api/v1/sources/{source_id}/connection-check │ │ ├─┬GET │ │ │ └─┬Servers │ │ │ └──[➖] servers (1:13608)❌ │ │ └─┬POST │ │ └─┬Servers │ │ └──[➖] servers (1:14639)❌ │ ├─┬/api/v1/jobs/{job_id} │ │ └─┬GET │ │ └─┬Servers │ │ └──[➖] servers (1:16737)❌ │ ├─┬/api/v1/workflows/ │ │ ├─┬GET │ │ │ └─┬Servers │ │ │ └──[➖] servers (1:23938)❌ │ │ └─┬POST │ │ └─┬Servers │ │ └──[➖] servers (1:24886)❌ │ ├─┬/api/v1/jobs/{job_id}/details │ │ └─┬GET │ │ └─┬Servers │ │ └──[➖] servers (1:19944)❌ │ ├─┬/api/v1/jobs/ │ │ └─┬GET │ │ └─┬Servers │ │ └──[➖] servers (1:15813)❌ │ ├─┬/api/v1/workflows/{workflow_id}/run │ │ └─┬POST │ │ └─┬Servers │ │ └──[➖] servers (1:28877)❌ │ ├─┬/general/v0/general │ │ └─┬POST │ │ └─┬Servers │ │ └──[➖] servers (1:32149)❌ │ ├─┬/api/v1/jobs/{job_id}/download │ │ └─┬GET │ │ └─┬Servers │ │ └──[➖] servers (1:18991)❌ │ ├─┬/api/v1/sources/ │ │ ├─┬GET │ │ │ └─┬Servers │ │ │ └──[➖] servers (1:8600)❌ │ │ └─┬POST │ │ └─┬Servers │ │ └──[➖] servers (1:9565)❌ │ ├─┬/api/v1/sources/{source_id} │ │ ├─┬GET │ │ │ └─┬Servers │ │ │ └──[➖] servers (1:10545)❌ │ │ ├─┬PUT │ │ │ └─┬Servers │ │ │ └──[➖] servers (1:11619)❌ │ │ └─┬DELETE │ │ └─┬Servers │ │ └──[➖] servers (1:12502)❌ │ ├─┬/api/v1/jobs/{job_id}/failed-files │ │ └─┬GET │ │ └─┬Servers │ │ └──[➖] servers (1:20899)❌ │ ├─┬/api/v1/users/secrets │ │ └─┬POST │ │ └─┬Servers │ │ └──[➖] servers (1:30692)❌ │ ├─┬/api/v1/destinations/{destination_id} │ │ ├─┬GET │ │ │ └─┬Servers │ │ │ └──[➖] servers (1:3306)❌ │ │ ├─┬PUT │ │ │ └─┬Servers │ │ │ └──[➖] servers (1:4420)❌ │ │ └─┬DELETE │ │ └─┬Servers │ │ └──[➖] servers (1:5322)❌ │ └─┬/api/v1/jobs/{job_id}/cancel │ └─┬POST │ └─┬Servers │ └──[➖] servers (1:17596)❌ └─┬Components ├──[➖] schemas (1:75109)❌ └──[➕] schemas (3726:40) ``` | Document Element | Total Changes | Breaking Changes | |------------------|---------------|------------------| | info | 1 | 0 | | paths | 30 | 29 | | components | 2 | 1 | ## PYTHON CHANGELOG ## examples: 3.0.2 - 2025-07-07 ### 🐛 Bug Fixes - Fix missing title and description in main usage examples when using x-speakeasy-globals *(commit by [@kanwardeep](https://github.com/Kanwardeep))* ## core: 5.19.4 - 2025-07-02 ### 🐛 Bug Fixes - ensure utils import is always added when globals are present in sdk.py template *(commit by [@AshGodfrey](https://github.com/AshGodfrey))* Co-authored-by: speakeasybot <[email protected]>
1 parent 8e89995 commit ec4e3aa

File tree

8 files changed

+95
-53
lines changed

8 files changed

+95
-53
lines changed

.speakeasy/gen.lock

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: 8b5fa338-9106-4734-abf0-e30d67044a90
33
management:
4-
docChecksum: 0593f5359a35b34f3dc1b346490deff2
5-
docVersion: 1.1.39
6-
speakeasyVersion: 1.568.0
7-
generationVersion: 2.632.2
8-
releaseVersion: 0.40.0
9-
configChecksum: 70954879fd1a6da62295461541e8680c
4+
docChecksum: ae9cd2cec2edbde7b002c0a127c7aa84
5+
docVersion: 1.1.42
6+
speakeasyVersion: 1.589.0
7+
generationVersion: 2.664.0
8+
releaseVersion: 0.41.0
9+
configChecksum: b2d39b13446f595978a73e31a796dbe7
1010
repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git
1111
repoSubDirectory: .
1212
installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git
@@ -16,17 +16,16 @@ features:
1616
acceptHeaders: 3.0.0
1717
additionalDependencies: 1.0.0
1818
constsAndDefaults: 1.0.5
19-
core: 5.19.3
19+
core: 5.19.4
2020
customCodeRegions: 0.1.1
2121
defaultEnabledRetries: 0.2.0
2222
enumUnions: 0.1.0
2323
envVarSecurityUsage: 0.3.2
24-
examples: 3.0.1
24+
examples: 3.0.2
2525
globalSecurity: 3.0.3
2626
globalSecurityCallbacks: 1.0.0
2727
globalSecurityFlattening: 1.0.0
2828
globalServerURLs: 3.1.1
29-
methodServerURLs: 3.1.1
3029
multipartFileContentType: 1.0.0
3130
nameOverrides: 3.0.1
3231
nullables: 1.0.1
@@ -39,7 +38,6 @@ features:
3938
uploadStreams: 1.0.0
4039
generatedFiles:
4140
- .gitattributes
42-
- .python-version
4341
- .vscode/settings.json
4442
- USAGE.md
4543
- docs/models/errors/detail.md
@@ -252,12 +250,17 @@ generatedFiles:
252250
- src/unstructured_client/_hooks/types.py
253251
- src/unstructured_client/_version.py
254252
- src/unstructured_client/basesdk.py
253+
- src/unstructured_client/destinations.py
255254
- src/unstructured_client/httpclient.py
255+
- src/unstructured_client/jobs.py
256256
- src/unstructured_client/models/__init__.py
257257
- src/unstructured_client/models/errors/__init__.py
258258
- src/unstructured_client/models/errors/httpvalidationerror.py
259+
- src/unstructured_client/models/errors/no_response_error.py
260+
- src/unstructured_client/models/errors/responsevalidationerror.py
259261
- src/unstructured_client/models/errors/sdkerror.py
260262
- src/unstructured_client/models/errors/servererror.py
263+
- src/unstructured_client/models/errors/unstructuredclienterror.py
261264
- src/unstructured_client/models/operations/__init__.py
262265
- src/unstructured_client/models/operations/cancel_job.py
263266
- src/unstructured_client/models/operations/create_connection_check_destinations.py
@@ -404,6 +407,7 @@ generatedFiles:
404407
- src/unstructured_client/py.typed
405408
- src/unstructured_client/sdk.py
406409
- src/unstructured_client/sdkconfiguration.py
410+
- src/unstructured_client/sources.py
407411
- src/unstructured_client/types/__init__.py
408412
- src/unstructured_client/types/basemodel.py
409413
- src/unstructured_client/users.py
@@ -421,8 +425,10 @@ generatedFiles:
421425
- src/unstructured_client/utils/retries.py
422426
- src/unstructured_client/utils/security.py
423427
- src/unstructured_client/utils/serializers.py
428+
- src/unstructured_client/utils/unmarshal_json_response.py
424429
- src/unstructured_client/utils/url.py
425430
- src/unstructured_client/utils/values.py
431+
- src/unstructured_client/workflows.py
426432
examples:
427433
create_connection_check_destinations:
428434
speakeasy-default-create-connection-check-destinations:

.speakeasy/workflow.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
speakeasyVersion: 1.552.0
1+
speakeasyVersion: 1.589.0
22
sources:
33
my-source:
44
sourceNamespace: my-source
5-
sourceRevisionDigest: sha256:ac2955e4a812caa63ad339156504c9bdfae02dd241800a6c48892aaf37552c54
6-
sourceBlobDigest: sha256:eb516ced31caa9801a7996b8216fa7c7a46ab16dc9edd4d9eef5721cee7acd6c
5+
sourceRevisionDigest: sha256:dc1c7c974419187404b25cb443e0d2497aa8b3ab71c95f27054eb5cd87b02ed0
6+
sourceBlobDigest: sha256:538ee1e259eb1db25ba57b09ba271636bad0015a794517bf6f910315e7ecaac3
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1752365566
10-
- 1.1.34
9+
- speakeasy-sdk-regen-1753403247
10+
- 1.1.42
1111
targets:
1212
unstructured-python:
1313
source: my-source
1414
sourceNamespace: my-source
15-
sourceRevisionDigest: sha256:ac2955e4a812caa63ad339156504c9bdfae02dd241800a6c48892aaf37552c54
16-
sourceBlobDigest: sha256:eb516ced31caa9801a7996b8216fa7c7a46ab16dc9edd4d9eef5721cee7acd6c
15+
sourceRevisionDigest: sha256:dc1c7c974419187404b25cb443e0d2497aa8b3ab71c95f27054eb5cd87b02ed0
16+
sourceBlobDigest: sha256:538ee1e259eb1db25ba57b09ba271636bad0015a794517bf6f910315e7ecaac3
1717
codeSamplesNamespace: my-source-code-samples
18-
codeSamplesRevisionDigest: sha256:e644b82aab2fb0dc0c506d643aa22910ae14bc998f2b13ac7cc019a789dbe552
18+
codeSamplesRevisionDigest: sha256:1e8db4a01c54f1f99e27cc80d3f5283192aa2a6a68001f80424fbf9bdface495
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

README.md

Lines changed: 44 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -153,26 +153,18 @@ with UnstructuredClient(
153153
<!-- Start Error Handling [errors] -->
154154
## Error Handling
155155

156-
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.
156+
[`UnstructuredClientError`](./src/unstructured_client/models/errors/unstructuredclienterror.py) is the base class for all HTTP error responses. It has the following properties:
157157

158-
By default, an API error will raise a errors.SDKError exception, which has the following properties:
159-
160-
| Property | Type | Description |
161-
|-----------------|------------------|-----------------------|
162-
| `.status_code` | *int* | The HTTP status code |
163-
| `.message` | *str* | The error message |
164-
| `.raw_response` | *httpx.Response* | The raw HTTP response |
165-
| `.body` | *str* | The response content |
166-
167-
When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `create_connection_check_destinations_async` method may raise the following exceptions:
168-
169-
| Error Type | Status Code | Content Type |
170-
| -------------------------- | ----------- | ---------------- |
171-
| errors.HTTPValidationError | 422 | application/json |
172-
| errors.SDKError | 4XX, 5XX | \*/\* |
158+
| Property | Type | Description |
159+
| ------------------ | ---------------- | --------------------------------------------------------------------------------------- |
160+
| `err.message` | `str` | Error message |
161+
| `err.status_code` | `int` | HTTP response status code eg `404` |
162+
| `err.headers` | `httpx.Headers` | HTTP response headers |
163+
| `err.body` | `str` | HTTP body. Can be empty string if no body is returned. |
164+
| `err.raw_response` | `httpx.Response` | Raw HTTP response |
165+
| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
173166

174167
### Example
175-
176168
```python
177169
from unstructured_client import UnstructuredClient
178170
from unstructured_client.models import errors
@@ -191,13 +183,42 @@ with UnstructuredClient() as uc_client:
191183
# Handle response
192184
print(res.dag_node_connection_check)
193185

194-
except errors.HTTPValidationError as e:
195-
# handle e.data: errors.HTTPValidationErrorData
196-
raise(e)
197-
except errors.SDKError as e:
198-
# handle exception
199-
raise(e)
186+
187+
except errors.UnstructuredClientError as e:
188+
# The base class for HTTP error responses
189+
print(e.message)
190+
print(e.status_code)
191+
print(e.body)
192+
print(e.headers)
193+
print(e.raw_response)
194+
195+
# Depending on the method different errors may be thrown
196+
if isinstance(e, errors.HTTPValidationError):
197+
print(e.data.detail) # Optional[errors.Detail]
200198
```
199+
200+
### Error Classes
201+
**Primary errors:**
202+
* [`UnstructuredClientError`](./src/unstructured_client/models/errors/unstructuredclienterror.py): The base class for HTTP error responses.
203+
* [`HTTPValidationError`](./src/unstructured_client/models/errors/httpvalidationerror.py): Validation Error. Status code `422`.
204+
205+
<details><summary>Less common errors (6)</summary>
206+
207+
<br />
208+
209+
**Network errors:**
210+
* [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors.
211+
* [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server.
212+
* [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out.
213+
214+
215+
**Inherit from [`UnstructuredClientError`](./src/unstructured_client/models/errors/unstructuredclienterror.py)**:
216+
* [`ServerError`](./src/unstructured_client/models/errors/servererror.py): Server Error. Status code `5XX`. Applicable to 1 of 29 methods.*
217+
* [`ResponseValidationError`](./src/unstructured_client/models/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
218+
219+
</details>
220+
221+
\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable.
201222
<!-- End Error Handling [errors] -->
202223

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

RELEASES.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,3 +1069,14 @@ Based on:
10691069
- [python v0.40.0] .
10701070
### Releases
10711071
- [PyPI v0.40.0] https://pypi.org/project/unstructured-client/0.40.0 - .
1072+
1073+
1074+
## 2025-07-25 00:27:12
1075+
### Changes
1076+
Based on:
1077+
- OpenAPI Doc
1078+
- Speakeasy CLI 1.589.0 (2.664.0) https://github.com/speakeasy-api/speakeasy
1079+
### Generated
1080+
- [python v0.41.0] .
1081+
### Releases
1082+
- [PyPI v0.41.0] https://pypi.org/project/unstructured-client/0.41.0 - .

codeSamples.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,18 @@ actions:
123123
- "lang": "python"
124124
"label": "create_connection_check_sources"
125125
"source": "from unstructured_client import UnstructuredClient\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.sources.create_connection_check_sources(request={\n \"source_id\": \"8d49e3f2-3e6d-4973-bc61-292af66829d7\",\n })\n\n assert res.dag_node_connection_check is not None\n\n # Handle response\n print(res.dag_node_connection_check)"
126-
- target: $["paths"]["/api/v1/users/retrieve"]["post"]
127-
update:
128-
"x-codeSamples":
129-
- "lang": "python"
130-
"label": "retrieve"
131-
"source": "from unstructured_client import UnstructuredClient\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.users.retrieve(request={})\n\n assert res.pem_auth_response is not None\n\n # Handle response\n print(res.pem_auth_response)"
132126
- target: $["paths"]["/api/v1/users/secrets"]["post"]
133127
update:
134128
"x-codeSamples":
135129
- "lang": "python"
136130
"label": "store_secret"
137131
"source": "from unstructured_client import UnstructuredClient\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.users.store_secret(request={\n \"encrypted_secret\": {\n \"encrypted_value\": \"<value>\",\n },\n })\n\n assert res.secret_reference is not None\n\n # Handle response\n print(res.secret_reference)"
132+
- target: $["paths"]["/api/v1/users/secrets/encryption-certificate"]["get"]
133+
update:
134+
"x-codeSamples":
135+
- "lang": "python"
136+
"label": "get_encryption_certificate"
137+
"source": "from unstructured_client import UnstructuredClient\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.users.get_encryption_certificate(request={})\n\n assert res.encryption_certificate_response is not None\n\n # Handle response\n print(res.encryption_certificate_response)"
138138
- target: $["paths"]["/api/v1/workflows/"]["get"]
139139
update:
140140
"x-codeSamples":
@@ -176,4 +176,4 @@ actions:
176176
"x-codeSamples":
177177
- "lang": "python"
178178
"label": "partition"
179-
"source": "from unstructured_client import UnstructuredClient\nfrom unstructured_client.models import shared\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.general.partition(request={\n \"partition_parameters\": {\n \"files\": {\n \"file_name\": \"example.file\",\n \"content\": open(\"example.file\", \"rb\"),\n },\n \"vlm_model_provider\": shared.VLMModelProvider.OPENAI,\n \"vlm_model\": shared.VLMModel.GPT_4O,\n \"split_pdf_page_range\": [\n 1,\n 10,\n ],\n },\n })\n\n assert res.elements is not None\n\n # Handle response\n print(res.elements)"
179+
"source": "from unstructured_client import UnstructuredClient\nfrom unstructured_client.models import shared\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.general.partition(request={\n \"partition_parameters\": {\n \"files\": {\n \"file_name\": \"example.file\",\n \"content\": open(\"example.file\", \"rb\"),\n },\n \"strategy\": shared.Strategy.AUTO,\n \"vlm_model_provider\": shared.VLMModelProvider.OPENAI,\n \"vlm_model\": shared.VLMModel.GPT_4O,\n \"chunking_strategy\": \"by_title\",\n \"split_pdf_page_range\": [\n 1,\n 10,\n ],\n \"split_pdf_cache_tmp_data_dir\": \"<value>\",\n },\n })\n\n assert res.elements is not None\n\n # Handle response\n print(res.elements)"

gen.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ generation:
1313
auth:
1414
oAuth2ClientCredentialsEnabled: false
1515
oAuth2PasswordEnabled: false
16+
tests:
17+
generateTests: true
18+
generateNewTests: false
19+
skipResponseBodyAssertions: false
1620
python:
1721
version: 0.41.0
1822
additionalDependencies:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "unstructured-client"
3-
version = "0.40.0"
3+
version = "0.41.0"
44
description = "Python Client SDK for Unstructured API"
55
authors = [{ name = "Unstructured" },]
66
readme = "README-PYPI.md"

src/unstructured_client/_version.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import importlib.metadata
44

55
__title__: str = "unstructured-client"
6-
__version__: str = "0.40.0"
7-
__openapi_doc_version__: str = "1.1.39"
8-
__gen_version__: str = "2.632.2"
9-
__user_agent__: str = "speakeasy-sdk/python 0.40.0 2.632.2 1.1.39 unstructured-client"
6+
__version__: str = "0.41.0"
7+
__openapi_doc_version__: str = "1.1.42"
8+
__gen_version__: str = "2.664.0"
9+
__user_agent__: str = "speakeasy-sdk/python 0.41.0 2.664.0 1.1.42 unstructured-client"
1010

1111
try:
1212
if __package__ is not None:

0 commit comments

Comments
 (0)