Skip to content

Commit

Permalink
chore: 🐝 Update SDK - Generate 0.26.1 (#193)
Browse files Browse the repository at this point in the history
> [!IMPORTANT]
> Linting report available at:
<https://app.speakeasy.com/org/unstructured/unstructured5xr/linting-report/fb0f893c12d346d83d09ed7a78ccd94c>
> OpenAPI Change report available at:
<https://app.speakeasy.com/org/unstructured/unstructured5xr/changes-report/f0aa82f260ce9d7abc2d45ed677576f2>
# SDK update
Based on:
- OpenAPI Doc  
- Speakeasy CLI 1.418.1 (2.438.3)
https://github.com/speakeasy-api/speakeasy
## OpenAPI Change Summary
No specification changes

Co-authored-by: speakeasybot <[email protected]>
  • Loading branch information
github-actions[bot] and speakeasybot authored Oct 12, 2024
1 parent eaa7619 commit 529fe87
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 15 deletions.
11 changes: 6 additions & 5 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: 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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 - .
- [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 - .
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 4 additions & 0 deletions src/unstructured_client/__init__.py
Original file line number Diff line number Diff line change
@@ -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__
12 changes: 12 additions & 0 deletions src/unstructured_client/_version.py
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions src/unstructured_client/sdkconfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 13 additions & 2 deletions src/unstructured_client/utils/annotations.py
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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}')

0 comments on commit 529fe87

Please sign in to comment.