Skip to content

Commit 13d88bb

Browse files
authored
Merge pull request #16 from Unstructured-IO/speakeasy-sdk-regen-1701821971
chore: 🐝 Update SDK - Generate
2 parents 7142e6a + 46a1cac commit 13d88bb

File tree

15 files changed

+61
-154
lines changed

15 files changed

+61
-154
lines changed

Diff for: README.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616

1717
This is a Python client for the [Unstructured API](https://unstructured-io.github.io/unstructured/api.html).
1818

19-
<!-- Start SDK Installation -->
19+
<!-- Start SDK Installation [installation] -->
2020
## SDK Installation
2121

2222
```bash
2323
pip install unstructured-client
2424
```
25-
<!-- End SDK Installation -->
25+
<!-- End SDK Installation [installation] -->
2626

2727
## Usage
2828
Only the `files` parameter is required. See the [general partition](docs/sdks/general/README.md) page for all available parameters. 
@@ -86,17 +86,13 @@ s = unstructured_client.UnstructuredClient(
8686
)
8787
```
8888

89-
<!-- Start Dev Containers -->
90-
91-
<!-- End Dev Containers -->
92-
9389
<!-- No SDK Example Usage -->
9490
<!-- No SDK Available Operations -->
9591
<!-- No Pagination -->
9692
<!-- No Error Handling -->
9793
<!-- No Server Selection -->
9894

99-
<!-- Start Custom HTTP Client -->
95+
<!-- Start Custom HTTP Client [http-client] -->
10096
## Custom HTTP Client
10197

10298
The Python SDK makes API calls using the (requests)[https://pypi.org/project/requests/] HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.
@@ -110,7 +106,7 @@ http_client = requests.Session()
110106
http_client.headers.update({'x-custom-header': 'someValue'})
111107
s = unstructured_client.UnstructuredClient(client: http_client)
112108
```
113-
<!-- End Custom HTTP Client -->
109+
<!-- End Custom HTTP Client [http-client] -->
114110

115111
<!-- No Retries -->
116112
<!-- No Authentication -->

Diff for: RELEASES.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -284,4 +284,24 @@ Based on:
284284
### Generated
285285
- [python v0.14.3] .
286286
### Releases
287-
- [PyPI v0.14.3] https://pypi.org/project/unstructured-client/0.14.3 - .
287+
- [PyPI v0.14.3] https://pypi.org/project/unstructured-client/0.14.3 - .
288+
289+
## 2023-12-06 00:19:29
290+
### Changes
291+
Based on:
292+
- OpenAPI Doc 0.0.1
293+
- Speakeasy CLI 1.125.2 (2.210.6) https://github.com/speakeasy-api/speakeasy
294+
### Generated
295+
- [python v0.14.4] .
296+
### Releases
297+
- [PyPI v0.14.4] https://pypi.org/project/unstructured-client/0.14.4 - .
298+
299+
## 2023-12-12 00:19:45
300+
### Changes
301+
Based on:
302+
- OpenAPI Doc 0.0.1
303+
- Speakeasy CLI 1.126.0 (2.213.3) https://github.com/speakeasy-api/speakeasy
304+
### Generated
305+
- [python v0.15.0] .
306+
### Releases
307+
- [PyPI v0.15.0] https://pypi.org/project/unstructured-client/0.15.0 - .

Diff for: USAGE.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Start SDK Example Usage -->
1+
<!-- Start SDK Example Usage [usage] -->
22
```python
33
import unstructured_client
44
from unstructured_client.models import shared
@@ -28,9 +28,7 @@ req = shared.PartitionParameters(
2828
new_after_n_chars=1500,
2929
output_format='application/json',
3030
skip_infer_table_types=[
31-
'p',
32-
'd',
33-
'f',
31+
'pdf',
3432
],
3533
strategy='hi_res',
3634
)
@@ -41,4 +39,4 @@ if res.elements is not None:
4139
# handle response
4240
pass
4341
```
44-
<!-- End SDK Example Usage -->
42+
<!-- End SDK Example Usage [usage] -->

Diff for: docs/models/shared/partitionparameters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
| `new_after_n_chars` | *Optional[int]* | :heavy_minus_sign: | If chunking strategy is set, cut off new sections after reaching a length of n chars (soft max). Default: 1500 | 1500 |
2020
| `output_format` | *Optional[str]* | :heavy_minus_sign: | The format of the response. Supported formats are application/json and text/csv. Default: application/json. | application/json |
2121
| `pdf_infer_table_structure` | *Optional[bool]* | :heavy_minus_sign: | If True and strategy=hi_res, any Table Elements extracted from a PDF will include an additional metadata field, 'text_as_html', where the value (string) is a just a transformation of the data into an HTML <table>. | |
22-
| `skip_infer_table_types` | List[*str*] | :heavy_minus_sign: | The document types that you want to skip table extraction with. Default: ['pdf', 'jpg', 'png'] | pdf |
22+
| `skip_infer_table_types` | List[*str*] | :heavy_minus_sign: | The document types that you want to skip table extraction with. Default: ['pdf', 'jpg', 'png'] | |
2323
| `strategy` | *Optional[str]* | :heavy_minus_sign: | The strategy to use for partitioning PDF/image. Options are fast, hi_res, auto. Default: auto | hi_res |
2424
| `xml_keep_tags` | *Optional[bool]* | :heavy_minus_sign: | If True, will retain the XML tags in the output. Otherwise it will simply extract the text from within the tags. Only applies to partition_xml. | |

Diff for: docs/models/utils/retryconfig.md

-24
This file was deleted.

Diff for: docs/sdks/general/README.md

-73
This file was deleted.

Diff for: docs/sdks/unstructuredclient/README.md

-9
This file was deleted.

Diff for: files.gen

+1-4
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,12 @@ src/unstructured_client/models/__init__.py
1818
src/unstructured_client/models/errors/__init__.py
1919
src/unstructured_client/models/operations/__init__.py
2020
src/unstructured_client/models/shared/__init__.py
21-
USAGE.md
2221
docs/models/operations/partitionresponse.md
2322
docs/models/errors/httpvalidationerror.md
2423
docs/models/shared/loc.md
2524
docs/models/shared/validationerror.md
2625
docs/models/shared/files.md
2726
docs/models/shared/partitionparameters.md
2827
docs/models/shared/security.md
29-
docs/sdks/unstructuredclient/README.md
30-
docs/models/utils/retryconfig.md
31-
docs/sdks/general/README.md
28+
USAGE.md
3229
.gitattributes

Diff for: gen.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ configVersion: 1.0.0
22
management:
33
docChecksum: bf57420eebd40f2b1d166092f01e3927
44
docVersion: 0.0.1
5-
speakeasyVersion: 1.121.3
6-
generationVersion: 2.195.2
5+
speakeasyVersion: 1.126.0
6+
generationVersion: 2.213.3
77
generation:
88
comments: {}
99
sdkClassName: unstructured_client
@@ -12,15 +12,15 @@ generation:
1212
optionalPropertyRendering: withExample
1313
features:
1414
python:
15-
core: 4.1.5
15+
core: 4.3.0
1616
examples: 2.81.3
17-
globalSecurity: 2.83.0
17+
globalSecurity: 2.83.1
1818
globalServerURLs: 2.82.1
1919
nameOverrides: 2.81.1
2020
retries: 2.82.0
2121
serverIDs: 2.81.1
2222
python:
23-
version: 0.14.3
23+
version: 0.15.0
2424
author: Unstructured
2525
clientServerStatusCodesAsErrors: true
2626
description: Python Client SDK for Unstructured API

Diff for: setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setuptools.setup(
1212
name="unstructured-client",
13-
version="0.14.3",
13+
version="0.15.0",
1414
author="Unstructured",
1515
description="Python Client SDK for Unstructured API",
1616
long_description=long_description,

Diff for: src/unstructured_client/general.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None:
1313

1414

1515

16-
def partition(self, request: shared.PartitionParameters, retries: Optional[utils.RetryConfig] = None) -> operations.PartitionResponse:
16+
def partition(self, request: Optional[shared.PartitionParameters], retries: Optional[utils.RetryConfig] = None) -> operations.PartitionResponse:
1717
r"""Pipeline 1"""
1818
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
1919

2020
url = base_url + '/general/v0/general'
2121
headers = {}
22-
req_content_type, data, form = utils.serialize_request_body(request, "request", False, True, 'multipart')
22+
req_content_type, data, form = utils.serialize_request_body(request, Optional[shared.PartitionParameters], "request", False, True, 'multipart')
2323
if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
2424
headers['content-type'] = req_content_type
2525
headers['Accept'] = 'application/json'

Diff for: src/unstructured_client/models/errors/httpvalidationerror.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ class HTTPValidationError(Exception):
1616

1717

1818
def __str__(self) -> str:
19-
return utils.marshal_json(self)
19+
return utils.marshal_json(self, type(self))

Diff for: src/unstructured_client/sdk.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import requests as requests_http
44
from .general import General
55
from .sdkconfiguration import SDKConfiguration
6-
from typing import Callable, Dict, Union
6+
from typing import Dict
77
from unstructured_client import utils
88
from unstructured_client.models import shared
99

@@ -14,7 +14,7 @@ class UnstructuredClient:
1414
sdk_configuration: SDKConfiguration
1515

1616
def __init__(self,
17-
api_key_auth: Union[str,Callable[[], str]],
17+
api_key_auth: str ,
1818
server: str = None,
1919
server_url: str = None,
2020
url_params: Dict[str, str] = None,

Diff for: src/unstructured_client/sdkconfiguration.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ class SDKConfiguration:
2727
server: str = ''
2828
language: str = 'python'
2929
openapi_doc_version: str = '0.0.1'
30-
sdk_version: str = '0.14.3'
31-
gen_version: str = '2.195.2'
32-
user_agent: str = 'speakeasy-sdk/python 0.14.3 2.195.2 0.0.1 unstructured-client'
30+
sdk_version: str = '0.15.0'
31+
gen_version: str = '2.213.3'
32+
user_agent: str = 'speakeasy-sdk/python 0.15.0 2.213.3 0.0.1 unstructured-client'
3333
retry_config: RetryConfig = None
3434

3535
def get_server_details(self) -> Tuple[str, Dict[str, str]]:

0 commit comments

Comments
 (0)