From 972fe25b729ef5f86bb08ebf2ded540c1a9808e4 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 8 Feb 2024 16:10:23 +0000 Subject: [PATCH 1/3] ci: regenerated with OpenAPI Doc 0.0.1, Speakeasy CLI 1.174.2 --- .speakeasy/gen.lock | 8 ++++---- RELEASES.md | 12 +++++++++++- docs/models/operations/partitionresponse.md | 4 ++-- gen.yaml | 3 ++- setup.py | 2 +- src/unstructured_client/general.py | 4 +--- .../models/operations/partition.py | 4 ++-- src/unstructured_client/sdk.py | 2 -- src/unstructured_client/sdkconfiguration.py | 6 +++--- 9 files changed, 26 insertions(+), 19 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 86f21596..7e2af778 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -4,16 +4,16 @@ management: docChecksum: 903444f359d1dfa6342c692ae3e5c7ff docVersion: 0.0.1 speakeasyVersion: internal - generationVersion: 2.248.1 - releaseVersion: 0.17.0 - configChecksum: b943408cdcab76d427c2cba0f6584bf4 + generationVersion: 2.250.19 + releaseVersion: 0.18.0 + configChecksum: 938a4a39baa5695a3140be3b858483d4 repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git repoSubDirectory: . installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git published: true features: python: - core: 4.4.4 + core: 4.4.5 examples: 2.81.3 globalSecurity: 2.83.2 globalServerURLs: 2.82.1 diff --git a/RELEASES.md b/RELEASES.md index 719e1271..189b3d18 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -414,4 +414,14 @@ Based on: ### Generated - [python v0.17.0] . ### Releases -- [PyPI v0.17.0] https://pypi.org/project/unstructured-client/0.17.0 - . \ No newline at end of file +- [PyPI v0.17.0] https://pypi.org/project/unstructured-client/0.17.0 - . + +## 2024-02-08 16:10:16 +### Changes +Based on: +- OpenAPI Doc 0.0.1 +- Speakeasy CLI 1.174.2 (2.250.19) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.18.0] . +### Releases +- [PyPI v0.18.0] https://pypi.org/project/unstructured-client/0.18.0 - . \ No newline at end of file diff --git a/docs/models/operations/partitionresponse.md b/docs/models/operations/partitionresponse.md index 9d8b2752..b0dbc682 100644 --- a/docs/models/operations/partitionresponse.md +++ b/docs/models/operations/partitionresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `elements` | List[*Any*] | :heavy_minus_sign: | Successful Response | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `elements` | List[*Any*] | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/gen.yaml b/gen.yaml index cabac9a8..9f6e1178 100644 --- a/gen.yaml +++ b/gen.yaml @@ -6,8 +6,9 @@ generation: fixes: nameResolutionDec2023: false parameterOrderingFeb2024: false + requestResponseComponentNamesFeb2024: false python: - version: 0.17.0 + version: 0.18.0 author: Unstructured clientServerStatusCodesAsErrors: true description: Python Client SDK for Unstructured API diff --git a/setup.py b/setup.py index 6f2c22b8..2599d8c2 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setuptools.setup( name="unstructured-client", - version="0.17.0", + version="0.18.0", author="Unstructured", description="Python Client SDK for Unstructured API", license = "MIT", diff --git a/src/unstructured_client/general.py b/src/unstructured_client/general.py index ccaa85b7..cbd14b1c 100644 --- a/src/unstructured_client/general.py +++ b/src/unstructured_client/general.py @@ -4,8 +4,6 @@ from typing import Any, List, Optional from unstructured_client import utils from unstructured_client.models import errors, operations, shared -from unstructured_client.utils._decorators import suggest_defining_url_if_401 # human code - class General: sdk_configuration: SDKConfiguration @@ -14,7 +12,7 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: self.sdk_configuration = sdk_config - @suggest_defining_url_if_401 # human code + def partition(self, request: Optional[shared.PartitionParameters], retries: Optional[utils.RetryConfig] = None) -> operations.PartitionResponse: r"""Pipeline 1""" base_url = utils.template_url(*self.sdk_configuration.get_server_details()) diff --git a/src/unstructured_client/models/operations/partition.py b/src/unstructured_client/models/operations/partition.py index 70ef4ae4..b5fc73c7 100644 --- a/src/unstructured_client/models/operations/partition.py +++ b/src/unstructured_client/models/operations/partition.py @@ -10,10 +10,10 @@ class PartitionResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" - raw_response: requests_http.Response = dataclasses.field() - r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" elements: Optional[List[Any]] = dataclasses.field(default=None) r"""Successful Response""" diff --git a/src/unstructured_client/sdk.py b/src/unstructured_client/sdk.py index ff866c32..18fb5cb1 100644 --- a/src/unstructured_client/sdk.py +++ b/src/unstructured_client/sdk.py @@ -6,7 +6,6 @@ from typing import Callable, Dict, Union from unstructured_client import utils from unstructured_client.models import shared -from unstructured_client.utils._decorators import clean_server_url # human code class UnstructuredClient: r"""Unstructured Pipeline API: Partition documents with the Unstructured library""" @@ -14,7 +13,6 @@ class UnstructuredClient: sdk_configuration: SDKConfiguration - @clean_server_url # human code def __init__(self, api_key_auth: Union[str, Callable[[], str]], server: str = None, diff --git a/src/unstructured_client/sdkconfiguration.py b/src/unstructured_client/sdkconfiguration.py index c4391db6..f5d9f83d 100644 --- a/src/unstructured_client/sdkconfiguration.py +++ b/src/unstructured_client/sdkconfiguration.py @@ -27,9 +27,9 @@ class SDKConfiguration: server: str = '' language: str = 'python' openapi_doc_version: str = '0.0.1' - sdk_version: str = '0.17.0' - gen_version: str = '2.248.1' - user_agent: str = 'speakeasy-sdk/python 0.17.0 2.248.1 0.0.1 unstructured-client' + sdk_version: str = '0.18.0' + gen_version: str = '2.250.19' + user_agent: str = 'speakeasy-sdk/python 0.18.0 2.250.19 0.0.1 unstructured-client' retry_config: RetryConfig = None def get_server_details(self) -> Tuple[str, Dict[str, str]]: From 625c545de56bbcc4f5983210b2323cb4d421f040 Mon Sep 17 00:00:00 2001 From: John <43506685+Coniferish@users.noreply.github.com> Date: Thu, 8 Feb 2024 10:27:49 -0600 Subject: [PATCH 2/3] Update general.py Add back human decorators --- src/unstructured_client/general.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/unstructured_client/general.py b/src/unstructured_client/general.py index cbd14b1c..0b29e720 100644 --- a/src/unstructured_client/general.py +++ b/src/unstructured_client/general.py @@ -4,6 +4,7 @@ from typing import Any, List, Optional from unstructured_client import utils from unstructured_client.models import errors, operations, shared +from unstructured_client.utils._decorators import suggest_defining_url_if_401 # human code class General: sdk_configuration: SDKConfiguration @@ -12,7 +13,7 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: self.sdk_configuration = sdk_config - + @suggest_defining_url_if_401 # human code def partition(self, request: Optional[shared.PartitionParameters], retries: Optional[utils.RetryConfig] = None) -> operations.PartitionResponse: r"""Pipeline 1""" base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -66,4 +67,4 @@ def do_request(): return res - \ No newline at end of file + From 77843b3860935f7b6d113320e1233a2618212351 Mon Sep 17 00:00:00 2001 From: John <43506685+Coniferish@users.noreply.github.com> Date: Thu, 8 Feb 2024 10:29:22 -0600 Subject: [PATCH 3/3] Update sdk.py add back human decorators --- src/unstructured_client/sdk.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/unstructured_client/sdk.py b/src/unstructured_client/sdk.py index 18fb5cb1..06dbba0f 100644 --- a/src/unstructured_client/sdk.py +++ b/src/unstructured_client/sdk.py @@ -6,6 +6,7 @@ from typing import Callable, Dict, Union from unstructured_client import utils from unstructured_client.models import shared +from unstructured_client.utils._decorators import clean_server_url # human code class UnstructuredClient: r"""Unstructured Pipeline API: Partition documents with the Unstructured library""" @@ -13,6 +14,7 @@ class UnstructuredClient: sdk_configuration: SDKConfiguration + @clean_server_url # human code def __init__(self, api_key_auth: Union[str, Callable[[], str]], server: str = None, @@ -55,4 +57,4 @@ def security(): def _init_sdks(self): self.general = General(self.sdk_configuration) - \ No newline at end of file +