Skip to content

Commit e8e5def

Browse files
committed
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.613.0
1 parent d288c14 commit e8e5def

File tree

15 files changed

+136
-33
lines changed

15 files changed

+136
-33
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.env.local
12
**/__pycache__/
23
**/.speakeasy/temp/
34
**/.speakeasy/logs/

.speakeasy/gen.lock

Lines changed: 7 additions & 7 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: 8038a5b9e376d44bad2fd4c117922954
5-
docVersion: 1.1.45
6-
speakeasyVersion: 1.601.0
7-
generationVersion: 2.680.0
8-
releaseVersion: 0.42.3
9-
configChecksum: 3d02dd7ca437781b3d721fab5d7b9adc
4+
docChecksum: a099a3a4f1b0273a9b08a78bca8f1c0a
5+
docVersion: 1.1.47
6+
speakeasyVersion: 1.613.0
7+
generationVersion: 2.696.0
8+
releaseVersion: 0.43.0
9+
configChecksum: 24a94df354d9a38bb09c5ae8d4987496
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,7 +16,7 @@ features:
1616
acceptHeaders: 3.0.0
1717
additionalDependencies: 1.0.0
1818
constsAndDefaults: 1.0.5
19-
core: 5.19.8
19+
core: 5.20.3
2020
customCodeRegions: 0.1.1
2121
defaultEnabledRetries: 0.2.0
2222
enumUnions: 0.1.0

.speakeasy/workflow.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
speakeasyVersion: 1.601.0
1+
speakeasyVersion: 1.613.0
22
sources:
33
my-source:
44
sourceNamespace: my-source
5-
sourceRevisionDigest: sha256:8165f715321cd34bcebb6c9bb0734a1791777229937787b8e13707d519b05a5e
6-
sourceBlobDigest: sha256:b4f8d9a6b0f4245c50b5e53298343df470978417248fa3988aeeb84ec9200c93
5+
sourceRevisionDigest: sha256:7e9007d2914db839260370c93ee5a7b74be16f182e59a914733c2a41b7c17d04
6+
sourceBlobDigest: sha256:c6a288e35427ff99b9f883f96301746d5ab723ee11bb5403931da5785d6178ac
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1754698272
10-
- 1.1.45
9+
- speakeasy-sdk-regen-1756339855
10+
- 1.1.47
1111
targets:
1212
unstructured-python:
1313
source: my-source
1414
sourceNamespace: my-source
15-
sourceRevisionDigest: sha256:8165f715321cd34bcebb6c9bb0734a1791777229937787b8e13707d519b05a5e
16-
sourceBlobDigest: sha256:b4f8d9a6b0f4245c50b5e53298343df470978417248fa3988aeeb84ec9200c93
15+
sourceRevisionDigest: sha256:7e9007d2914db839260370c93ee5a7b74be16f182e59a914733c2a41b7c17d04
16+
sourceBlobDigest: sha256:c6a288e35427ff99b9f883f96301746d5ab723ee11bb5403931da5785d6178ac
1717
codeSamplesNamespace: my-source-code-samples
18-
codeSamplesRevisionDigest: sha256:a5e11972bfb15e43b7fcb2647b3a7b3e129e9303294f9110670280971b10780a
18+
codeSamplesRevisionDigest: sha256:6a87f47eb13e1f9286d4ddd3e1b56235260fd43358713768915dbb24bb02e692
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,4 +1119,14 @@ Based on:
11191119
### Generated
11201120
- [python v0.42.3] .
11211121
### Releases
1122-
- [PyPI v0.42.3] https://pypi.org/project/unstructured-client/0.42.3 - .
1122+
- [PyPI v0.42.3] https://pypi.org/project/unstructured-client/0.42.3 - .
1123+
1124+
## 2025-09-09 00:10:36
1125+
### Changes
1126+
Based on:
1127+
- OpenAPI Doc
1128+
- Speakeasy CLI 1.613.0 (2.696.0) https://github.com/speakeasy-api/speakeasy
1129+
### Generated
1130+
- [python v0.43.0] .
1131+
### Releases
1132+
- [PyPI v0.43.0] https://pypi.org/project/unstructured-client/0.43.0 - .

gen.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ generation:
1818
generateNewTests: false
1919
skipResponseBodyAssertions: false
2020
python:
21-
version: 0.42.3
21+
version: 0.43.0
2222
additionalDependencies:
2323
dev:
2424
deepdiff: '>=6.0'
@@ -36,6 +36,9 @@ python:
3636
httpx: '>=0.27.0'
3737
pypdf: '>=4.0'
3838
requests-toolbelt: '>=1.0.0'
39+
allowedRedefinedBuiltins:
40+
- id
41+
- object
3942
authors:
4043
- Unstructured
4144
baseErrorName: UnstructuredClientError

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
[project]
33
name = "unstructured-client"
4-
version = "0.42.3"
4+
version = "0.43.0"
55
description = "Python Client SDK for Unstructured API"
66
authors = [{ name = "Unstructured" },]
77
readme = "README-PYPI.md"
@@ -49,6 +49,7 @@ build-backend = "poetry.core.masonry.api"
4949

5050
[tool.pytest.ini_options]
5151
asyncio_default_fixture_loop_scope = "function"
52+
asyncio_mode = "auto"
5253
pythonpath = ["src"]
5354

5455
[tool.mypy]

scripts/prepare_readme.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,17 @@
1010
GITHUB_URL = (
1111
GITHUB_URL[: -len(".git")] if GITHUB_URL.endswith(".git") else GITHUB_URL
1212
)
13+
REPO_SUBDIR = "."
14+
# Ensure the subdirectory has a trailing slash
15+
if not REPO_SUBDIR.endswith("/"):
16+
REPO_SUBDIR += "/"
1317
# links on PyPI should have absolute URLs
1418
readme_contents = re.sub(
1519
r"(\[[^\]]+\]\()((?!https?:)[^\)]+)(\))",
1620
lambda m: m.group(1)
1721
+ GITHUB_URL
1822
+ "/blob/master/"
23+
+ REPO_SUBDIR
1924
+ m.group(2)
2025
+ m.group(3),
2126
readme_contents,

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.42.3"
7-
__openapi_doc_version__: str = "1.1.45"
8-
__gen_version__: str = "2.680.0"
9-
__user_agent__: str = "speakeasy-sdk/python 0.42.3 2.680.0 1.1.45 unstructured-client"
6+
__version__: str = "0.43.0"
7+
__openapi_doc_version__: str = "1.1.47"
8+
__gen_version__: str = "2.696.0"
9+
__user_agent__: str = "speakeasy-sdk/python 0.43.0 2.696.0 1.1.47 unstructured-client"
1010

1111
try:
1212
if __package__ is not None:

src/unstructured_client/basesdk.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,19 @@
2020

2121
class BaseSDK:
2222
sdk_configuration: SDKConfiguration
23+
parent_ref: Optional[object] = None
24+
"""
25+
Reference to the root SDK instance, if any. This will prevent it from
26+
being garbage collected while there are active streams.
27+
"""
2328

24-
def __init__(self, sdk_config: SDKConfiguration) -> None:
29+
def __init__(
30+
self,
31+
sdk_config: SDKConfiguration,
32+
parent_ref: Optional[object] = None,
33+
) -> None:
2534
self.sdk_configuration = sdk_config
35+
self.parent_ref = parent_ref
2636

2737
def _get_url(self, base_url, url_variables):
2838
sdk_url, sdk_variables = self.sdk_configuration.get_server_details()

src/unstructured_client/models/errors/__init__.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
22

3+
from .unstructuredclienterror import UnstructuredClientError
34
from typing import TYPE_CHECKING
45
from importlib import import_module
56
import builtins
7+
import sys
68

79
if TYPE_CHECKING:
810
from .httpvalidationerror import (
@@ -14,7 +16,6 @@
1416
from .responsevalidationerror import ResponseValidationError
1517
from .sdkerror import SDKError
1618
from .servererror import ServerError, ServerErrorData
17-
from .unstructuredclienterror import UnstructuredClientError
1819

1920
__all__ = [
2021
"Detail",
@@ -37,10 +38,21 @@
3738
"SDKError": ".sdkerror",
3839
"ServerError": ".servererror",
3940
"ServerErrorData": ".servererror",
40-
"UnstructuredClientError": ".unstructuredclienterror",
4141
}
4242

4343

44+
def dynamic_import(modname, retries=3):
45+
for attempt in range(retries):
46+
try:
47+
return import_module(modname, __package__)
48+
except KeyError:
49+
# Clear any half-initialized module and retry
50+
sys.modules.pop(modname, None)
51+
if attempt == retries - 1:
52+
break
53+
raise KeyError(f"Failed to import module '{modname}' after {retries} attempts")
54+
55+
4456
def __getattr__(attr_name: str) -> object:
4557
module_name = _dynamic_imports.get(attr_name)
4658
if module_name is None:
@@ -49,7 +61,7 @@ def __getattr__(attr_name: str) -> object:
4961
)
5062

5163
try:
52-
module = import_module(module_name, __package__)
64+
module = dynamic_import(module_name)
5365
result = getattr(module, attr_name)
5466
return result
5567
except ImportError as e:

0 commit comments

Comments
 (0)