Skip to content

Commit 9353e41

Browse files
committed
ci: regenerated with OpenAPI Doc 0.0.1, Speakeasy CLI 1.116.0
1 parent f9103bf commit 9353e41

File tree

10 files changed

+43
-28
lines changed

10 files changed

+43
-28
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ s = unstructured_client.UnstructuredClient(
104104
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.
105105

106106

107-
For example, you could specify a header for every request that your sdk makes as follows:
107+
For example, you could specify a header for every request that this sdk makes as follows:
108108

109109
```python
110110
import unstructured_client

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,4 +244,14 @@ Based on:
244244
### Generated
245245
- [python v0.13.0] .
246246
### Releases
247-
- [PyPI v0.13.0] https://pypi.org/project/unstructured-client/0.13.0 - .
247+
- [PyPI v0.13.0] https://pypi.org/project/unstructured-client/0.13.0 - .
248+
249+
## 2023-11-09 00:18:03
250+
### Changes
251+
Based on:
252+
- OpenAPI Doc 0.0.1
253+
- Speakeasy CLI 1.116.0 (2.185.0) https://github.com/speakeasy-api/speakeasy
254+
### Generated
255+
- [python v0.14.0] .
256+
### Releases
257+
- [PyPI v0.14.0] https://pypi.org/project/unstructured-client/0.14.0 - .

docs/sdks/general/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# General
2-
(*.general*)
2+
(*general*)
33

44
### Available Operations
55

@@ -65,4 +65,9 @@ if res.elements is not None:
6565
### Response
6666

6767
**[operations.PartitionResponse](../../models/operations/partitionresponse.md)**
68+
### Errors
6869

70+
| Error Object | Status Code | Content Type |
71+
| -------------------------- | -------------------------- | -------------------------- |
72+
| errors.HTTPValidationError | 422 | application/json |
73+
| errors.SDKError | 400-600 | */* |

gen.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ configVersion: 1.0.0
22
management:
33
docChecksum: bf57420eebd40f2b1d166092f01e3927
44
docVersion: 0.0.1
5-
speakeasyVersion: 1.114.1
6-
generationVersion: 2.181.1
5+
speakeasyVersion: 1.116.0
6+
generationVersion: 2.185.0
77
generation:
88
comments: {}
99
sdkClassName: unstructured_client
1010
repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git
1111
features:
1212
python:
13-
core: 4.1.0
13+
core: 4.1.2
1414
examples: 2.81.3
15-
globalSecurity: 2.82.0
15+
globalSecurity: 2.83.0
1616
globalServerURLs: 2.82.0
1717
nameOverrides: 2.81.1
1818
retries: 2.82.0
1919
serverIDs: 2.81.1
2020
python:
21-
version: 0.13.0
21+
version: 0.14.0
2222
author: Unstructured
2323
clientServerStatusCodesAsErrors: true
2424
description: Python Client SDK for Unstructured API
@@ -31,8 +31,10 @@ python:
3131
operations: models/operations
3232
shared: models/shared
3333
webhooks: models/webhooks
34+
inputModelSuffix: input
3435
installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git
3536
maxMethodParams: 0
37+
outputModelSuffix: output
3638
packageName: unstructured-client
3739
published: true
3840
repoSubDirectory: .

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

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

src/unstructured_client/general.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def __init__(self, sdk_config: SDKConfiguration) -> None:
1212
self.sdk_configuration = sdk_config
1313

1414

15+
1516
def partition(self, request: shared.PartitionParameters, retries: Optional[utils.RetryConfig] = None) -> operations.PartitionResponse:
1617
r"""Pipeline 1"""
1718
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
@@ -24,7 +25,10 @@ def partition(self, request: shared.PartitionParameters, retries: Optional[utils
2425
headers['Accept'] = 'application/json'
2526
headers['user-agent'] = self.sdk_configuration.user_agent
2627

27-
client = self.sdk_configuration.security_client
28+
if callable(self.sdk_configuration.security):
29+
client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
30+
else:
31+
client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
2832

2933
global_retry_config = self.sdk_configuration.retry_config
3034
retry_config = retries

src/unstructured_client/models/errors/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
from .sdkerror import *
55
from .validationerror import *
66

7-
__all__ = ["HTTPValidationError","Loc","SDKError","ValidationError"]
7+
__all__ = ["HTTPValidationError","SDKError","ValidationError"]

src/unstructured_client/models/errors/validationerror.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77
from unstructured_client import utils
88

99

10-
@dataclasses.dataclass
11-
class Loc:
12-
pass
13-
14-
1510
@dataclass_json(undefined=Undefined.EXCLUDE)
1611
@dataclasses.dataclass
1712
class ValidationError:

src/unstructured_client/sdk.py

Lines changed: 5 additions & 7 deletions
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 Dict
6+
from typing import Callable, Dict, Union
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: str,
17+
api_key_auth: Union[str,Callable[[], str]],
1818
server: str = None,
1919
server_url: str = None,
2020
url_params: Dict[str, str] = None,
@@ -24,7 +24,7 @@ def __init__(self,
2424
"""Instantiates the SDK configuring it with the provided parameters.
2525
2626
:param api_key_auth: The api_key_auth required for authentication
27-
:type api_key_auth: str
27+
:type api_key_auth: Union[str,Callable[[], str]]
2828
:param server: The server by name to use for all operations
2929
:type server: str
3030
:param server_url: The server URL to use for all operations
@@ -39,15 +39,13 @@ def __init__(self,
3939
if client is None:
4040
client = requests_http.Session()
4141

42-
43-
security_client = utils.configure_security_client(client, shared.Security(api_key_auth = api_key_auth))
44-
42+
security = shared.Security(api_key_auth = api_key_auth)
4543

4644
if server_url is not None:
4745
if url_params is not None:
4846
server_url = utils.template_url(server_url, url_params)
4947

50-
self.sdk_configuration = SDKConfiguration(client, security_client, server_url, server, retry_config=retry_config)
48+
self.sdk_configuration = SDKConfiguration(client, security, server_url, server, retry_config=retry_config)
5149

5250
self._init_sdks()
5351

src/unstructured_client/sdkconfiguration.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
import requests
44
from dataclasses import dataclass
5-
from typing import Dict, Tuple
5+
from typing import Dict, Tuple, Callable, Union
66
from .utils.retries import RetryConfig
77
from .utils import utils
8+
from unstructured_client.models import shared
89

910

1011
SERVER_PROD = 'prod'
@@ -21,14 +22,14 @@
2122
@dataclass
2223
class SDKConfiguration:
2324
client: requests.Session
24-
security_client: requests.Session
25+
security: Union[shared.Security,Callable[[], shared.Security]] = None
2526
server_url: str = ''
2627
server: str = ''
2728
language: str = 'python'
2829
openapi_doc_version: str = '0.0.1'
29-
sdk_version: str = '0.13.0'
30-
gen_version: str = '2.181.1'
31-
user_agent: str = 'speakeasy-sdk/python 0.13.0 2.181.1 0.0.1 unstructured-client'
30+
sdk_version: str = '0.14.0'
31+
gen_version: str = '2.185.0'
32+
user_agent: str = 'speakeasy-sdk/python 0.14.0 2.185.0 0.0.1 unstructured-client'
3233
retry_config: RetryConfig = None
3334

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

0 commit comments

Comments
 (0)