Skip to content

Commit e0315cc

Browse files
github-actions[bot]speakeasybotawalker4
authored
chore: 🐝 Update SDK - Generate 0.31.1 (#244)
> [!IMPORTANT] > Linting report available at: <https://app.speakeasy.com/org/unstructured/unstructured5xr/linting-report/56b8fadf0a4c32fb46b246eacc5e6511> > OpenAPI Change report available at: <https://app.speakeasy.com/org/unstructured/unstructured5xr/changes-report/25a10e70a8fd9394c38f86beaa321685> # SDK update Based on: - OpenAPI Doc - Speakeasy CLI 1.513.2 (2.545.2) https://github.com/speakeasy-api/speakeasy ## Versioning Version Bump Type: [patch] - 🤖 (automated) ## OpenAPI Change Summary ``` └─┬Paths └─┬/api/v1/workflows/{workflow_id}/run └─┬POST └─┬Responses └─┬202 └─┬application/json └─┬Schema └──[🔀] $ref (3061:17)❌ ``` | Document Element | Total Changes | Breaking Changes | |------------------|---------------|------------------| | paths | 1 | 1 | ## PYTHON CHANGELOG No relevant generator changes --------- Co-authored-by: speakeasybot <[email protected]> Co-authored-by: Austin Walker <[email protected]>
1 parent c0f707d commit e0315cc

File tree

19 files changed

+95
-93
lines changed

19 files changed

+95
-93
lines changed

.speakeasy/gen.lock

+11-10
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: 8befe9665bd102e8cc2241c80080859a
4+
docChecksum: 761bdf240b7e572d6a866cee2c950c70
55
docVersion: 1.0.78
6-
speakeasyVersion: 1.509.0
7-
generationVersion: 2.539.0
8-
releaseVersion: 0.31.0
9-
configChecksum: faf5191e78f1597b78cd7600af4f1d96
6+
speakeasyVersion: 1.513.0
7+
generationVersion: 2.545.1
8+
releaseVersion: 0.31.1
9+
configChecksum: 569b9e45b4960f94a43454c345d9b38c
1010
repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git
1111
repoSubDirectory: .
1212
installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git
@@ -197,7 +197,7 @@ generatedFiles:
197197
- py.typed
198198
- pylintrc
199199
- pyproject.toml
200-
- scripts/prepare-readme.py
200+
- scripts/prepare_readme.py
201201
- scripts/publish.sh
202202
- src/unstructured_client/__init__.py
203203
- src/unstructured_client/_hooks/__init__.py
@@ -208,6 +208,7 @@ generatedFiles:
208208
- src/unstructured_client/destinations.py
209209
- src/unstructured_client/httpclient.py
210210
- src/unstructured_client/jobs.py
211+
- src/unstructured_client/models/__init__.py
211212
- src/unstructured_client/models/errors/__init__.py
212213
- src/unstructured_client/models/errors/httpvalidationerror.py
213214
- src/unstructured_client/models/errors/sdkerror.py
@@ -417,14 +418,14 @@ examples:
417418
"200":
418419
application/json: {"created_at": "2025-01-14T00:09:32.358Z", "id": "d18f330b-506f-455c-9cb8-0cee2386ac29", "runtime": "<value>", "status": "IN_PROGRESS", "workflow_id": "136fd799-4c45-4417-a632-f460d8ebb2a2", "workflow_name": "<value>"}
419420
"422":
420-
application/json: {"detail": "<value>"}
421+
application/json: {"detail": [{"loc": ["<value>", 701982], "msg": "<value>", "type": "<value>"}, {"loc": ["<value>"], "msg": "<value>", "type": "<value>"}]}
421422
list_jobs:
422423
speakeasy-default-list-jobs:
423424
responses:
424425
"200":
425426
application/json: [{"created_at": "2023-09-01T17:59:19.211Z", "id": "7098ff76-419f-4a5a-a313-d159507b629d", "runtime": "<value>", "status": "SCHEDULED", "workflow_id": "75cf761e-8c10-48e4-b3d7-6ae90ad4fd3e", "workflow_name": "<value>"}]
426427
"422":
427-
application/json: {"detail": [{"loc": [], "msg": "<value>", "type": "<value>"}]}
428+
application/json: {"detail": []}
428429
create_source:
429430
speakeasy-default-create-source:
430431
requestBody:
@@ -522,9 +523,9 @@ examples:
522523
header: {}
523524
responses:
524525
"202":
525-
application/json: {"created_at": "2024-08-04T10:06:22.481Z", "destinations": [], "id": "6c4f327c-7ca2-4933-a68d-2ebe9d9f1445", "name": "<value>", "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": ["a9593964-92eb-496f-84ac-c8f067ba24c3"], "status": "inactive", "workflow_nodes": [{"name": "<value>", "subtype": "<value>", "type": "chunk"}], "workflow_type": "custom"}
526+
application/json: {"created_at": "2024-08-04T10:06:22.481Z", "id": "6c4f327c-7ca2-4933-a68d-2ebe9d9f1445", "runtime": "<value>", "status": "COMPLETED", "workflow_id": "b67be6d9-8e94-40c8-afd7-21e5d2d00363", "workflow_name": "<value>"}
526527
"422":
527-
application/json: {"detail": [{"loc": ["<value>"], "msg": "<value>", "type": "<value>"}, {"loc": [397022, 604524], "msg": "<value>", "type": "<value>"}]}
528+
application/json: {"detail": [{"loc": ["<value>", 233068, "<value>"], "msg": "<value>", "type": "<value>"}]}
528529
update_workflow:
529530
speakeasy-default-update-workflow:
530531
parameters:

.speakeasy/workflow.lock

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
speakeasyVersion: 1.509.0
1+
speakeasyVersion: 1.513.0
22
sources:
33
my-source:
44
sourceNamespace: my-source
5-
sourceRevisionDigest: sha256:b62d80c1b902f285b4eaeaf67a4b1d2edb21053eded12c247daecbfeea1d8a30
6-
sourceBlobDigest: sha256:8d5c6a31539e2e1047e529fb6561fd4172fa80506241bc25dcf51d7c76f8b6e6
5+
sourceRevisionDigest: sha256:284396f88ac6b8f00fc6b64e117310094af9403c775d96d0273f2dc91e20a99d
6+
sourceBlobDigest: sha256:eeff76b4ac663079622a4957d5023f06ca2a8ad423075a125478ad3b57aeb4ef
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1741046993
9+
- speakeasy-sdk-regen-1741292249
1010
- 1.0.78
1111
targets:
1212
unstructured-python:
1313
source: my-source
1414
sourceNamespace: my-source
15-
sourceRevisionDigest: sha256:b62d80c1b902f285b4eaeaf67a4b1d2edb21053eded12c247daecbfeea1d8a30
16-
sourceBlobDigest: sha256:8d5c6a31539e2e1047e529fb6561fd4172fa80506241bc25dcf51d7c76f8b6e6
15+
sourceRevisionDigest: sha256:284396f88ac6b8f00fc6b64e117310094af9403c775d96d0273f2dc91e20a99d
16+
sourceBlobDigest: sha256:eeff76b4ac663079622a4957d5023f06ca2a8ad423075a125478ad3b57aeb4ef
1717
codeSamplesNamespace: my-source-code-samples
18-
codeSamplesRevisionDigest: sha256:77255b7d9241b11e147927beb6e60a27654bd6089e121356a3d5ca06e5f0f2f1
18+
codeSamplesRevisionDigest: sha256:19241c5759df66896762918163ed4cbb6be089a165082e64717f088fb50320c1
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ DOCKER_IMAGE ?= downloads.unstructured.io/unstructured-io/unstructured-api:lates
1111
.PHONY: install
1212
install:
1313
pip install -U poetry
14-
python scripts/prepare-readme.py
14+
python scripts/prepare_readme.py
1515
poetry install
1616

1717
## install-speakeasy-cli: download the speakeasy cli tool

RELEASES.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -845,4 +845,14 @@ Based on:
845845
### Generated
846846
- [python v0.31.0] .
847847
### Releases
848-
- [PyPI v0.31.0] https://pypi.org/project/unstructured-client/0.31.0 - .
848+
- [PyPI v0.31.0] https://pypi.org/project/unstructured-client/0.31.0 - .
849+
850+
## 2025-03-06 20:17:13
851+
### Changes
852+
Based on:
853+
- OpenAPI Doc
854+
- Speakeasy CLI 1.513.0 (2.545.1) https://github.com/speakeasy-api/speakeasy
855+
### Generated
856+
- [python v0.31.1] .
857+
### Releases
858+
- [PyPI v0.31.1] https://pypi.org/project/unstructured-client/0.31.1 - .

_test_contract/platform_api/test_workflows.py

+12-25
Original file line numberDiff line numberDiff line change
@@ -226,21 +226,17 @@ def test_run_workflow(httpx_mock, client: UnstructuredClient, platform_api_url:
226226

227227
httpx_mock.add_response(
228228
method="POST",
229-
url=url,
230229
status_code=202,
230+
headers={"Content-Type": "application/json"},
231231
json={
232-
"created_at": "2024-08-04T10:06:22.481Z",
233-
"id": "6c4f327c-7ca2-4933-a68d-2ebe9d9f1445",
234-
"name": "test_workflow",
235-
"schedule": {"crontab_entries": [{"cron_expression": "0 0 * * 0"}]},
236-
"sources": ["a9593964-92eb-496f-84ac-c8f067ba24c3"],
237-
"destinations": [
238-
"aeebecc7-9d8e-4625-bf1d-815c2f084869",
239-
],
240-
"workflow_nodes": [],
241-
"status": "active",
242-
"workflow_type": "platinum",
232+
"created_at": "2025-06-22T11:37:21.648Z",
233+
"id": "fcdc4994-eea5-425c-91fa-e03f2bd8030d",
234+
"status": "IN_PROGRESS",
235+
"runtime": None,
236+
"workflow_id": "16b80fee-64dc-472d-8f26-1d7729b6423d",
237+
"workflow_name": "test_workflow",
243238
},
239+
url=url,
244240
)
245241

246242
run_workflow_response = client.workflows.run_workflow(
@@ -257,16 +253,7 @@ def test_run_workflow(httpx_mock, client: UnstructuredClient, platform_api_url:
257253
assert request.method == "POST"
258254
assert request.url == url
259255

260-
workflow_run = run_workflow_response.workflow_information
261-
assert workflow_run.id == "6c4f327c-7ca2-4933-a68d-2ebe9d9f1445"
262-
assert workflow_run.name == "test_workflow"
263-
assert workflow_run.workflow_type == "platinum"
264-
assert workflow_run.status == "active"
265-
assert workflow_run.created_at == datetime.fromisoformat(
266-
"2024-08-04T10:06:22.481+00:00"
267-
)
268-
assert workflow_run.schedule == shared.WorkflowSchedule(
269-
crontab_entries=[shared.crontabentry.CronTabEntry(cron_expression="0 0 * * 0")]
270-
)
271-
assert workflow_run.sources == ["a9593964-92eb-496f-84ac-c8f067ba24c3"]
272-
assert workflow_run.destinations == ["aeebecc7-9d8e-4625-bf1d-815c2f084869"]
256+
new_job = run_workflow_response.job_information
257+
assert new_job.id == "fcdc4994-eea5-425c-91fa-e03f2bd8030d"
258+
assert new_job.workflow_name == "test_workflow"
259+
assert new_job.status == "IN_PROGRESS"

codeSamples.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ actions:
116116
"x-codeSamples":
117117
- "lang": "python"
118118
"label": "run_workflow"
119-
"source": "from unstructured_client import UnstructuredClient\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.workflows.run_workflow(request={\n \"workflow_id\": \"6b67be6d-98e9-440c-88fd-721e5d2d0036\",\n })\n\n assert res.workflow_information is not None\n\n # Handle response\n print(res.workflow_information)"
119+
"source": "from unstructured_client import UnstructuredClient\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.workflows.run_workflow(request={\n \"workflow_id\": \"6b67be6d-98e9-440c-88fd-721e5d2d0036\",\n })\n\n assert res.job_information is not None\n\n # Handle response\n print(res.job_information)"
120120
- target: $["paths"]["/general/v0/general"]["post"]
121121
update:
122122
"x-codeSamples":

docs/models/operations/runworkflowresponse.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
## Fields
55

6-
| Field | Type | Required | Description |
7-
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
8-
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
9-
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
10-
| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
11-
| `workflow_information` | [Optional[shared.WorkflowInformation]](../../models/shared/workflowinformation.md) | :heavy_minus_sign: | Successful Response |
6+
| Field | Type | Required | Description |
7+
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
8+
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
9+
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
10+
| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
11+
| `job_information` | [Optional[shared.JobInformation]](../../models/shared/jobinformation.md) | :heavy_minus_sign: | Successful Response |

docs/sdks/workflows/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,10 @@ with UnstructuredClient() as uc_client:
201201
"workflow_id": "6b67be6d-98e9-440c-88fd-721e5d2d0036",
202202
})
203203

204-
assert res.workflow_information is not None
204+
assert res.job_information is not None
205205

206206
# Handle response
207-
print(res.workflow_information)
207+
print(res.job_information)
208208

209209
```
210210

gen.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ generation:
1212
oAuth2ClientCredentialsEnabled: false
1313
oAuth2PasswordEnabled: false
1414
python:
15-
version: 0.31.0
15+
version: 0.31.1
1616
additionalDependencies:
1717
dev:
1818
deepdiff: '>=6.0'

poetry.lock

+9-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pylintrc

+4-1
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,10 @@ disable=raw-checker-failed,
454454
bare-except,
455455
broad-exception-caught,
456456
fixme,
457-
relative-beyond-top-level
457+
relative-beyond-top-level,
458+
consider-using-with,
459+
wildcard-import,
460+
unused-wildcard-import
458461

459462
# Enable the message, report, category or checker with the given id(s). You can
460463
# either give multiple identifier separated by comma (,) or put this option

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "unstructured-client"
3-
version = "0.31.0"
3+
version = "0.31.1"
44
description = "Python Client SDK for Unstructured API"
55
authors = [{ name = "Unstructured" },]
66
readme = "README-PYPI.md"
@@ -15,7 +15,7 @@ dependencies = [
1515
"pypdf >=4.0",
1616
"python-dateutil >=2.8.2",
1717
"requests-toolbelt >=1.0.0",
18-
"typing-inspect >=0.9.0",
18+
"typing-inspection >=0.4.0",
1919
]
2020

2121
[tool.poetry]

scripts/prepare-readme.py scripts/prepare_readme.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import shutil
55

66
try:
7-
with open("README.md", "r") as rh:
7+
with open("README.md", "r", encoding="utf-8") as rh:
88
readme_contents = rh.read()
99
GITHUB_URL = "https://github.com/Unstructured-IO/unstructured-python-client.git"
1010
GITHUB_URL = (
@@ -21,13 +21,13 @@
2121
readme_contents,
2222
)
2323

24-
with open("README-PYPI.md", "w") as wh:
24+
with open("README-PYPI.md", "w", encoding="utf-8") as wh:
2525
wh.write(readme_contents)
2626
except Exception as e:
2727
try:
2828
print("Failed to rewrite README.md to README-PYPI.md, copying original instead")
2929
print(e)
3030
shutil.copyfile("README.md", "README-PYPI.md")
31-
except Exception as e:
31+
except Exception as ie:
3232
print("Failed to copy README.md to README-PYPI.md")
33-
print(e)
33+
print(ie)

scripts/publish.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
export POETRY_PYPI_TOKEN_PYPI=${PYPI_TOKEN}
44

5-
poetry run python scripts/prepare-readme.py
5+
poetry run python scripts/prepare_readme.py
66

77
poetry publish --build --skip-existing

src/unstructured_client/_version.py

+3-3
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.31.0"
6+
__version__: str = "0.31.1"
77
__openapi_doc_version__: str = "1.0.78"
8-
__gen_version__: str = "2.539.0"
9-
__user_agent__: str = "speakeasy-sdk/python 0.31.0 2.539.0 1.0.78 unstructured-client"
8+
__gen_version__: str = "2.545.1"
9+
__user_agent__: str = "speakeasy-sdk/python 0.31.1 2.545.1 1.0.78 unstructured-client"
1010

1111
try:
1212
if __package__ is not None:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2+
3+
# package
4+

src/unstructured_client/models/operations/run_workflow.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
from pydantic import model_serializer
77
from typing import Optional
88
from typing_extensions import Annotated, NotRequired, TypedDict
9-
from unstructured_client.models.shared import (
10-
workflowinformation as shared_workflowinformation,
11-
)
9+
from unstructured_client.models.shared import jobinformation as shared_jobinformation
1210
from unstructured_client.types import (
1311
BaseModel,
1412
Nullable,
@@ -80,9 +78,7 @@ class RunWorkflowResponseTypedDict(TypedDict):
8078
r"""HTTP response status code for this operation"""
8179
raw_response: httpx.Response
8280
r"""Raw HTTP response; suitable for custom response parsing"""
83-
workflow_information: NotRequired[
84-
shared_workflowinformation.WorkflowInformationTypedDict
85-
]
81+
job_information: NotRequired[shared_jobinformation.JobInformationTypedDict]
8682
r"""Successful Response"""
8783

8884

@@ -96,7 +92,5 @@ class RunWorkflowResponse(BaseModel):
9692
raw_response: httpx.Response
9793
r"""Raw HTTP response; suitable for custom response parsing"""
9894

99-
workflow_information: Optional[shared_workflowinformation.WorkflowInformation] = (
100-
None
101-
)
95+
job_information: Optional[shared_jobinformation.JobInformation] = None
10296
r"""Successful Response"""

0 commit comments

Comments
 (0)