From 1f52bc730a2b37df7348e82c34f64ef5e616cd51 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Sat, 12 Oct 2024 17:37:31 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.418.1 --- .speakeasy/gen.lock | 11 ++++++----- .speakeasy/workflow.lock | 6 +++--- RELEASES.md | 12 +++++++++++- pyproject.toml | 2 +- src/unstructured_client/__init__.py | 4 ++++ src/unstructured_client/_version.py | 12 ++++++++++++ src/unstructured_client/sdkconfiguration.py | 6 +++--- src/unstructured_client/utils/annotations.py | 15 +++++++++++++-- 8 files changed, 53 insertions(+), 15 deletions(-) create mode 100644 src/unstructured_client/_version.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8457ba25..161548ef 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,10 +3,10 @@ id: 8b5fa338-9106-4734-abf0-e30d67044a90 management: docChecksum: 21f469b38bb72725739ee9d9d0fc8780 docVersion: 1.0.51 - speakeasyVersion: 1.410.0 - generationVersion: 2.434.1 - releaseVersion: 0.26.0 - configChecksum: 0916704b547a0697b2ccf93c0d4becac + speakeasyVersion: 1.418.1 + generationVersion: 2.438.3 + releaseVersion: 0.26.1 + configChecksum: 55ded3ef4f1b052725cdab6587da0ea4 repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git repoSubDirectory: . installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git @@ -15,7 +15,7 @@ features: python: additionalDependencies: 1.0.0 constsAndDefaults: 1.0.4 - core: 5.5.8 + core: 5.6.0 defaultEnabledRetries: 0.2.0 enumUnions: 0.1.0 envVarSecurityUsage: 0.3.1 @@ -64,6 +64,7 @@ generatedFiles: - src/unstructured_client/_hooks/__init__.py - src/unstructured_client/_hooks/sdkhooks.py - src/unstructured_client/_hooks/types.py + - src/unstructured_client/_version.py - src/unstructured_client/basesdk.py - src/unstructured_client/general.py - src/unstructured_client/httpclient.py diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 04018a2f..57722445 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,8 +1,8 @@ -speakeasyVersion: 1.410.0 +speakeasyVersion: 1.418.1 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:4587b07d95e133a5fe806b02e4b82bb9e268499adeaa299139edf722073f5bb1 + sourceRevisionDigest: sha256:a820d523af3e56f0dd1fc84f4f29e15330edb26cc253e93981bddb4a5176ac3c sourceBlobDigest: sha256:27e4879df402e924f9f65d336ea6d2fc8b16a00b87b4a802866238f7e9f639d3 tags: - latest @@ -11,7 +11,7 @@ targets: unstructured-python: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:4587b07d95e133a5fe806b02e4b82bb9e268499adeaa299139edf722073f5bb1 + sourceRevisionDigest: sha256:a820d523af3e56f0dd1fc84f4f29e15330edb26cc253e93981bddb4a5176ac3c sourceBlobDigest: sha256:27e4879df402e924f9f65d336ea6d2fc8b16a00b87b4a802866238f7e9f639d3 workflow: workflowVersion: 1.0.0 diff --git a/RELEASES.md b/RELEASES.md index 803be956..31d1b953 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -694,4 +694,14 @@ Based on: ### Generated - [python v0.26.0] . ### Releases -- [PyPI v0.26.0] https://pypi.org/project/unstructured-client/0.26.0 - . \ No newline at end of file +- [PyPI v0.26.0] https://pypi.org/project/unstructured-client/0.26.0 - . + +## 2024-10-12 17:36:38 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.418.1 (2.438.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.26.1] . +### Releases +- [PyPI v0.26.1] https://pypi.org/project/unstructured-client/0.26.1 - . \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3f728816..0acb1067 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "unstructured-client" -version = "0.26.0" +version = "0.26.1" description = "Python Client SDK for Unstructured API" authors = ["Unstructured",] readme = "README-PYPI.md" diff --git a/src/unstructured_client/__init__.py b/src/unstructured_client/__init__.py index d8d60c47..5c349179 100644 --- a/src/unstructured_client/__init__.py +++ b/src/unstructured_client/__init__.py @@ -1,4 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +from ._version import __title__, __version__ from .sdk import * from .sdkconfiguration import * + + +VERSION: str = __version__ diff --git a/src/unstructured_client/_version.py b/src/unstructured_client/_version.py new file mode 100644 index 00000000..bad8f5de --- /dev/null +++ b/src/unstructured_client/_version.py @@ -0,0 +1,12 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +import importlib.metadata + +__title__: str = "unstructured-client" +__version__: str = "0.26.1" + +try: + if __package__ is not None: + __version__ = importlib.metadata.version(__package__) +except importlib.metadata.PackageNotFoundError: + pass diff --git a/src/unstructured_client/sdkconfiguration.py b/src/unstructured_client/sdkconfiguration.py index d8111013..1a363e2d 100644 --- a/src/unstructured_client/sdkconfiguration.py +++ b/src/unstructured_client/sdkconfiguration.py @@ -34,9 +34,9 @@ class SDKConfiguration: server: Optional[str] = "" language: str = "python" openapi_doc_version: str = "1.0.51" - sdk_version: str = "0.26.0" - gen_version: str = "2.434.1" - user_agent: str = "speakeasy-sdk/python 0.26.0 2.434.1 1.0.51 unstructured-client" + sdk_version: str = "0.26.1" + gen_version: str = "2.438.3" + user_agent: str = "speakeasy-sdk/python 0.26.1 2.438.3 1.0.51 unstructured-client" retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None diff --git a/src/unstructured_client/utils/annotations.py b/src/unstructured_client/utils/annotations.py index 0d17472b..5b3bbb02 100644 --- a/src/unstructured_client/utils/annotations.py +++ b/src/unstructured_client/utils/annotations.py @@ -1,5 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +from enum import Enum from typing import Any def get_discriminator(model: Any, fieldname: str, key: str) -> str: @@ -10,10 +11,20 @@ def get_discriminator(model: Any, fieldname: str, key: str) -> str: raise ValueError(f'Could not find discriminator key {key} in {model}') from e if hasattr(model, fieldname): - return f'{getattr(model, fieldname)}' + attr = getattr(model, fieldname) + + if isinstance(attr, Enum): + return f'{attr.value}' + + return f'{attr}' fieldname = fieldname.upper() if hasattr(model, fieldname): - return f'{getattr(model, fieldname)}' + attr = getattr(model, fieldname) + + if isinstance(attr, Enum): + return f'{attr.value}' + + return f'{attr}' raise ValueError(f'Could not find discriminator field {fieldname} in {model}')