Skip to content

chore: 🐝 Update SDK - Generate 0.31.1 #244

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 2 commits into from
Mar 7, 2025
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
21 changes: 11 additions & 10 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 8b5fa338-9106-4734-abf0-e30d67044a90
management:
docChecksum: 8befe9665bd102e8cc2241c80080859a
docChecksum: 761bdf240b7e572d6a866cee2c950c70
docVersion: 1.0.78
speakeasyVersion: 1.509.0
generationVersion: 2.539.0
releaseVersion: 0.31.0
configChecksum: faf5191e78f1597b78cd7600af4f1d96
speakeasyVersion: 1.513.0
generationVersion: 2.545.1
releaseVersion: 0.31.1
configChecksum: 569b9e45b4960f94a43454c345d9b38c
repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git
repoSubDirectory: .
installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git
Expand Down Expand Up @@ -197,7 +197,7 @@ generatedFiles:
- py.typed
- pylintrc
- pyproject.toml
- scripts/prepare-readme.py
- scripts/prepare_readme.py
- scripts/publish.sh
- src/unstructured_client/__init__.py
- src/unstructured_client/_hooks/__init__.py
Expand All @@ -208,6 +208,7 @@ generatedFiles:
- src/unstructured_client/destinations.py
- src/unstructured_client/httpclient.py
- src/unstructured_client/jobs.py
- src/unstructured_client/models/__init__.py
- src/unstructured_client/models/errors/__init__.py
- src/unstructured_client/models/errors/httpvalidationerror.py
- src/unstructured_client/models/errors/sdkerror.py
Expand Down Expand Up @@ -417,14 +418,14 @@ examples:
"200":
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>"}
"422":
application/json: {"detail": "<value>"}
application/json: {"detail": [{"loc": ["<value>", 701982], "msg": "<value>", "type": "<value>"}, {"loc": ["<value>"], "msg": "<value>", "type": "<value>"}]}
list_jobs:
speakeasy-default-list-jobs:
responses:
"200":
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>"}]
"422":
application/json: {"detail": [{"loc": [], "msg": "<value>", "type": "<value>"}]}
application/json: {"detail": []}
create_source:
speakeasy-default-create-source:
requestBody:
Expand Down Expand Up @@ -522,9 +523,9 @@ examples:
header: {}
responses:
"202":
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"}
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>"}
"422":
application/json: {"detail": [{"loc": ["<value>"], "msg": "<value>", "type": "<value>"}, {"loc": [397022, 604524], "msg": "<value>", "type": "<value>"}]}
application/json: {"detail": [{"loc": ["<value>", 233068, "<value>"], "msg": "<value>", "type": "<value>"}]}
update_workflow:
speakeasy-default-update-workflow:
parameters:
Expand Down
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
speakeasyVersion: 1.509.0
speakeasyVersion: 1.513.0
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:b62d80c1b902f285b4eaeaf67a4b1d2edb21053eded12c247daecbfeea1d8a30
sourceBlobDigest: sha256:8d5c6a31539e2e1047e529fb6561fd4172fa80506241bc25dcf51d7c76f8b6e6
sourceRevisionDigest: sha256:284396f88ac6b8f00fc6b64e117310094af9403c775d96d0273f2dc91e20a99d
sourceBlobDigest: sha256:eeff76b4ac663079622a4957d5023f06ca2a8ad423075a125478ad3b57aeb4ef
tags:
- latest
- speakeasy-sdk-regen-1741046993
- speakeasy-sdk-regen-1741292249
- 1.0.78
targets:
unstructured-python:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:b62d80c1b902f285b4eaeaf67a4b1d2edb21053eded12c247daecbfeea1d8a30
sourceBlobDigest: sha256:8d5c6a31539e2e1047e529fb6561fd4172fa80506241bc25dcf51d7c76f8b6e6
sourceRevisionDigest: sha256:284396f88ac6b8f00fc6b64e117310094af9403c775d96d0273f2dc91e20a99d
sourceBlobDigest: sha256:eeff76b4ac663079622a4957d5023f06ca2a8ad423075a125478ad3b57aeb4ef
codeSamplesNamespace: my-source-code-samples
codeSamplesRevisionDigest: sha256:77255b7d9241b11e147927beb6e60a27654bd6089e121356a3d5ca06e5f0f2f1
codeSamplesRevisionDigest: sha256:19241c5759df66896762918163ed4cbb6be089a165082e64717f088fb50320c1
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ DOCKER_IMAGE ?= downloads.unstructured.io/unstructured-io/unstructured-api:lates
.PHONY: install
install:
pip install -U poetry
python scripts/prepare-readme.py
python scripts/prepare_readme.py
poetry install

## install-speakeasy-cli: download the speakeasy cli tool
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -845,4 +845,14 @@ Based on:
### Generated
- [python v0.31.0] .
### Releases
- [PyPI v0.31.0] https://pypi.org/project/unstructured-client/0.31.0 - .
- [PyPI v0.31.0] https://pypi.org/project/unstructured-client/0.31.0 - .

## 2025-03-06 20:17:13
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.513.0 (2.545.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.31.1] .
### Releases
- [PyPI v0.31.1] https://pypi.org/project/unstructured-client/0.31.1 - .
37 changes: 12 additions & 25 deletions _test_contract/platform_api/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,21 +226,17 @@ def test_run_workflow(httpx_mock, client: UnstructuredClient, platform_api_url:

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

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

workflow_run = run_workflow_response.workflow_information
assert workflow_run.id == "6c4f327c-7ca2-4933-a68d-2ebe9d9f1445"
assert workflow_run.name == "test_workflow"
assert workflow_run.workflow_type == "platinum"
assert workflow_run.status == "active"
assert workflow_run.created_at == datetime.fromisoformat(
"2024-08-04T10:06:22.481+00:00"
)
assert workflow_run.schedule == shared.WorkflowSchedule(
crontab_entries=[shared.crontabentry.CronTabEntry(cron_expression="0 0 * * 0")]
)
assert workflow_run.sources == ["a9593964-92eb-496f-84ac-c8f067ba24c3"]
assert workflow_run.destinations == ["aeebecc7-9d8e-4625-bf1d-815c2f084869"]
new_job = run_workflow_response.job_information
assert new_job.id == "fcdc4994-eea5-425c-91fa-e03f2bd8030d"
assert new_job.workflow_name == "test_workflow"
assert new_job.status == "IN_PROGRESS"
2 changes: 1 addition & 1 deletion codeSamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ actions:
"x-codeSamples":
- "lang": "python"
"label": "run_workflow"
"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)"
"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)"
- target: $["paths"]["/general/v0/general"]["post"]
update:
"x-codeSamples":
Expand Down
12 changes: 6 additions & 6 deletions docs/models/operations/runworkflowresponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

## Fields

| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `workflow_information` | [Optional[shared.WorkflowInformation]](../../models/shared/workflowinformation.md) | :heavy_minus_sign: | Successful Response |
| Field | Type | Required | Description |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `job_information` | [Optional[shared.JobInformation]](../../models/shared/jobinformation.md) | :heavy_minus_sign: | Successful Response |
4 changes: 2 additions & 2 deletions docs/sdks/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ with UnstructuredClient() as uc_client:
"workflow_id": "6b67be6d-98e9-440c-88fd-721e5d2d0036",
})

assert res.workflow_information is not None
assert res.job_information is not None

# Handle response
print(res.workflow_information)
print(res.job_information)

```

Expand Down
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ generation:
oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false
python:
version: 0.31.0
version: 0.31.1
additionalDependencies:
dev:
deepdiff: '>=6.0'
Expand Down
19 changes: 9 additions & 10 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,10 @@ disable=raw-checker-failed,
bare-except,
broad-exception-caught,
fixme,
relative-beyond-top-level
relative-beyond-top-level,
consider-using-with,
wildcard-import,
unused-wildcard-import

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "unstructured-client"
version = "0.31.0"
version = "0.31.1"
description = "Python Client SDK for Unstructured API"
authors = [{ name = "Unstructured" },]
readme = "README-PYPI.md"
Expand All @@ -15,7 +15,7 @@ dependencies = [
"pypdf >=4.0",
"python-dateutil >=2.8.2",
"requests-toolbelt >=1.0.0",
"typing-inspect >=0.9.0",
"typing-inspection >=0.4.0",
]

[tool.poetry]
Expand Down
8 changes: 4 additions & 4 deletions scripts/prepare-readme.py → scripts/prepare_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import shutil

try:
with open("README.md", "r") as rh:
with open("README.md", "r", encoding="utf-8") as rh:
readme_contents = rh.read()
GITHUB_URL = "https://github.com/Unstructured-IO/unstructured-python-client.git"
GITHUB_URL = (
Expand All @@ -21,13 +21,13 @@
readme_contents,
)

with open("README-PYPI.md", "w") as wh:
with open("README-PYPI.md", "w", encoding="utf-8") as wh:
wh.write(readme_contents)
except Exception as e:
try:
print("Failed to rewrite README.md to README-PYPI.md, copying original instead")
print(e)
shutil.copyfile("README.md", "README-PYPI.md")
except Exception as e:
except Exception as ie:
print("Failed to copy README.md to README-PYPI.md")
print(e)
print(ie)
2 changes: 1 addition & 1 deletion scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

export POETRY_PYPI_TOKEN_PYPI=${PYPI_TOKEN}

poetry run python scripts/prepare-readme.py
poetry run python scripts/prepare_readme.py

poetry publish --build --skip-existing
6 changes: 3 additions & 3 deletions src/unstructured_client/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import importlib.metadata

__title__: str = "unstructured-client"
__version__: str = "0.31.0"
__version__: str = "0.31.1"
__openapi_doc_version__: str = "1.0.78"
__gen_version__: str = "2.539.0"
__user_agent__: str = "speakeasy-sdk/python 0.31.0 2.539.0 1.0.78 unstructured-client"
__gen_version__: str = "2.545.1"
__user_agent__: str = "speakeasy-sdk/python 0.31.1 2.545.1 1.0.78 unstructured-client"

try:
if __package__ is not None:
Expand Down
4 changes: 4 additions & 0 deletions src/unstructured_client/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

# package

12 changes: 3 additions & 9 deletions src/unstructured_client/models/operations/run_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
from pydantic import model_serializer
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
from unstructured_client.models.shared import (
workflowinformation as shared_workflowinformation,
)
from unstructured_client.models.shared import jobinformation as shared_jobinformation
from unstructured_client.types import (
BaseModel,
Nullable,
Expand Down Expand Up @@ -80,9 +78,7 @@ class RunWorkflowResponseTypedDict(TypedDict):
r"""HTTP response status code for this operation"""
raw_response: httpx.Response
r"""Raw HTTP response; suitable for custom response parsing"""
workflow_information: NotRequired[
shared_workflowinformation.WorkflowInformationTypedDict
]
job_information: NotRequired[shared_jobinformation.JobInformationTypedDict]
r"""Successful Response"""


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

workflow_information: Optional[shared_workflowinformation.WorkflowInformation] = (
None
)
job_information: Optional[shared_jobinformation.JobInformation] = None
r"""Successful Response"""
Loading