Skip to content

Commit 8e03f91

Browse files
chore: 🐝 Update SDK - Generate (#100)
> [!IMPORTANT] > Linting report available at: <https://app.speakeasyapi.dev/org/unstructured/unstructured5xr/linting-report/b5c1b43e1a6d3192adfaa8a949137c1d> > OpenAPI Change report available at: <https://app.speakeasyapi.dev/org/unstructured/unstructured5xr/changes-report/c343d62405cf18e9c2c220dcf6c9315b> # SDK update Based on: - OpenAPI Doc - Speakeasy CLI 1.299.4 (2.338.7) https://github.com/speakeasy-api/speakeasy ## OpenAPI Change Summary ``` ├─┬Info │ └──[🔀] version (1:80) └─┬Components └─┬partition_parameters ├─┬hi_res_model_name │ └─┬ANYOF │ └──[➕] default (1:3918)❌ ├─┬output_format │ └─┬Extensions │ └──[➕] x-speakeasy-unknown-values (1:3452) ├─┬similarity_threshold │ └─┬ANYOF │ └──[➕] default (1:8329)❌ ├─┬max_characters │ ├─┬ANYOF │ │ └──[🔀] type (1:6885)❌ │ └─┬ANYOF │ ├──[🔀] type (1:6847)❌ │ └──[➕] default (1:6869)❌ ├─┬encoding │ └─┬ANYOF │ └──[➕] default (1:3707)❌ ├─┬chunking_strategy │ ├─┬ANYOF │ │ └──[➕] default (1:5933)❌ │ └─┬Extensions │ └──[➕] x-speakeasy-unknown-values (1:6193) ├─┬combine_under_n_chars │ ├─┬ANYOF │ │ └──[🔀] type (1:6286)❌ │ └─┬ANYOF │ ├──[🔀] type (1:6248)❌ │ └──[➕] default (1:6270)❌ ├─┬include_orig_elements │ └─┬ANYOF │ └──[➕] default (1:6572)❌ ├─┬new_after_n_chars │ ├─┬ANYOF │ │ └──[🔀] type (1:7350)❌ │ └─┬ANYOF │ ├──[🔀] type (1:7312)❌ │ └──[➕] default (1:7334)❌ ├─┬starting_page_number │ ├─┬ANYOF │ │ └──[🔀] type (1:5531)❌ │ └─┬ANYOF │ ├──[🔀] type (1:5493)❌ │ └──[➕] default (1:5515)❌ ├─┬gz_uncompressed_content_type │ └─┬ANYOF │ └──[➕] default (1:3038)❌ ├─┬unique_element_ids │ └──[🔀] description (1:5237) └─┬strategy └─┬Extensions └──[➕] x-speakeasy-unknown-values (1:4870) ``` | Document Element | Total Changes | Breaking Changes | |------------------|---------------|------------------| | info | 1 | 0 | | components | 22 | 18 | ## PYTHON CHANGELOG ## openEnums: 0.1.0 - 2024-05-14 ### 🐝 New Features - add support for "open" enums *(commit by [@disintegrator](https://github.com/disintegrator))* Co-authored-by: speakeasybot <[email protected]>
1 parent aa785d0 commit 8e03f91

File tree

13 files changed

+65
-37
lines changed

13 files changed

+65
-37
lines changed

.speakeasy/gen.lock

Lines changed: 8 additions & 6 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: 3956d4428b6275f96d6859db352f202f
5-
docVersion: 1.0.30
6-
speakeasyVersion: 1.295.1
7-
generationVersion: 2.335.5
8-
releaseVersion: 0.26.5
9-
configChecksum: 06b34b8ab68e59b2fec780ed1663e371
4+
docChecksum: 95cf473b65c812e2a731bc586e691f89
5+
docVersion: 1.0.32
6+
speakeasyVersion: 1.299.4
7+
generationVersion: 2.338.7
8+
releaseVersion: 0.27.0
9+
configChecksum: f30a94fe7726e498bf687d6aefa48ec4
1010
repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git
1111
repoSubDirectory: .
1212
installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git
@@ -23,6 +23,7 @@ features:
2323
globalServerURLs: 2.82.2
2424
nameOverrides: 2.81.2
2525
nullables: 0.1.0
26+
openEnums: 0.1.0
2627
responseFormat: 0.1.0
2728
retries: 2.82.2
2829
sdkHooks: 0.1.0
@@ -37,6 +38,7 @@ generatedFiles:
3738
- setup.py
3839
- src/unstructured_client/__init__.py
3940
- src/unstructured_client/utils/__init__.py
41+
- src/unstructured_client/utils/enums.py
4042
- src/unstructured_client/utils/retries.py
4143
- src/unstructured_client/utils/utils.py
4244
- src/unstructured_client/models/errors/sdkerror.py

.speakeasy/workflow.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
speakeasyVersion: 1.295.1
1+
speakeasyVersion: 1.299.4
22
sources:
33
my-source:
44
sourceNamespace: my-source
5-
sourceRevisionDigest: sha256:bad4b97e6b725d31784534a0eb12c6a679f8b9c266ab6ac6233157c86df73900
6-
sourceBlobDigest: sha256:68a72efa165cf4635ab30f872a9b6e3a2057cdcc689254bb96feb30c7b7970bd
5+
sourceRevisionDigest: sha256:1f77ecb5a93c98a2666959cc431213df275eb3daf04c08c78f76b4d28579d765
6+
sourceBlobDigest: sha256:823dd5db79564693f9fe02a562840c3fe02a6cd546917e9bac7aecd60dd8c260
77
tags:
88
- latest
99
- main
1010
targets:
1111
unstructured-python:
1212
source: my-source
1313
sourceNamespace: my-source
14-
sourceRevisionDigest: sha256:bad4b97e6b725d31784534a0eb12c6a679f8b9c266ab6ac6233157c86df73900
15-
sourceBlobDigest: sha256:68a72efa165cf4635ab30f872a9b6e3a2057cdcc689254bb96feb30c7b7970bd
14+
sourceRevisionDigest: sha256:1f77ecb5a93c98a2666959cc431213df275eb3daf04c08c78f76b4d28579d765
15+
sourceBlobDigest: sha256:823dd5db79564693f9fe02a562840c3fe02a6cd546917e9bac7aecd60dd8c260
1616
outLocation: /github/workspace/repo
1717
workflow:
1818
workflowVersion: 1.0.0

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ res = s.general.partition(request=operations.PartitionRequest(
166166
partition_parameters=shared.PartitionParameters(
167167
files=shared.Files(
168168
content='0x2cC94b2FEF'.encode(),
169-
file_name='um.shtml',
169+
file_name='your_file_here',
170170
),
171-
strategy=shared.Strategy.HI_RES,
171+
strategy=shared.Strategy.AUTO,
172172
),
173173
))
174174

RELEASES.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,4 +554,12 @@ Based on:
554554
- OpenAPI Doc
555555
- Speakeasy CLI 1.295.1 (2.335.5) https://github.com/speakeasy-api/speakeasy
556556
### Generated
557-
- [python v0.26.5] .
557+
- [python v0.26.5] .
558+
559+
## 2024-06-03 00:52:27
560+
### Changes
561+
Based on:
562+
- OpenAPI Doc
563+
- Speakeasy CLI 1.299.4 (2.338.7) https://github.com/speakeasy-api/speakeasy
564+
### Generated
565+
- [python v0.27.0] .

USAGE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ res = s.general.partition(request=operations.PartitionRequest(
1212
partition_parameters=shared.PartitionParameters(
1313
files=shared.Files(
1414
content='0x2cC94b2FEF'.encode(),
15-
file_name='um.shtml',
15+
file_name='your_file_here',
1616
),
17-
strategy=shared.Strategy.HI_RES,
17+
strategy=shared.Strategy.AUTO,
1818
),
1919
))
2020

codeSamples.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ actions:
2020
res = s.general.partition(request=operations.PartitionRequest(
2121
partition_parameters=shared.PartitionParameters(
2222
files=shared.Files(
23-
file_name='and.wav',
24-
content='0xb2FEF2EFFf'.encode(),
23+
file_name='your_file_here',
24+
content='0x2cC94b2FEF'.encode(),
2525
),
26-
strategy=shared.Strategy.HI_RES,
26+
strategy=shared.Strategy.AUTO,
2727
),
2828
))
2929

docs/models/shared/partitionparameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@
3030
| `split_pdf_page` | *Optional[bool]* | :heavy_minus_sign: | This parameter determines if the PDF file should be split on the client side. It's an internal parameter for the Python client and is not sent to the backend. | |
3131
| `starting_page_number` | *Optional[int]* | :heavy_minus_sign: | When PDF is split into pages before sending it into the API, providing this information will allow the page number to be assigned correctly. Introduced in 1.0.27. | |
3232
| `strategy` | [Optional[shared.Strategy]](../../models/shared/strategy.md) | :heavy_minus_sign: | The strategy to use for partitioning PDF/image. Options are fast, hi_res, auto. Default: auto | auto |
33-
| `unique_element_ids` | *Optional[bool]* | :heavy_minus_sign: | When `True`, assign UUIDs to element IDs, which guarantees their uniqueness <br/>(useful when using them as primary keys in database). Otherwise a SHA-256 of element text is used. Default: False | |
33+
| `unique_element_ids` | *Optional[bool]* | :heavy_minus_sign: | When `True`, assign UUIDs to element IDs, which guarantees their uniqueness (useful when using them as primary keys in database). Otherwise a SHA-256 of element text is used. Default: False | |
3434
| `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. | |

gen.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ generation:
1010
auth:
1111
oAuth2ClientCredentialsEnabled: false
1212
python:
13-
version: 0.26.5
13+
version: 0.27.0
1414
additionalDependencies:
1515
dependencies:
16-
deepdiff: ">=6.0"
17-
pypdf: ">=4.0"
18-
requests-toolbelt: ">=1.0.0"
19-
httpx: ">=0.27.0"
16+
deepdiff: '>=6.0'
17+
httpx: '>=0.27.0'
18+
pypdf: '>=4.0'
19+
requests-toolbelt: '>=1.0.0'
2020
extraDependencies:
2121
dev: {}
2222
author: Unstructured

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
setuptools.setup(
2121
name='unstructured-client',
22-
version='0.26.5',
22+
version='0.27.0',
2323
author='Unstructured',
2424
description='Python Client SDK for Unstructured API',
2525
license = 'MIT',
@@ -32,6 +32,7 @@
3232
"charset-normalizer>=3.2.0",
3333
"dataclasses-json>=0.6.4",
3434
"deepdiff>=6.0",
35+
"httpx>=0.27.0",
3536
"idna>=3.4",
3637
"jsonpath-python>=1.0.6",
3738
"marshmallow>=3.19.0",
@@ -45,7 +46,6 @@
4546
"typing-inspect>=0.9.0",
4647
"typing_extensions>=4.7.1",
4748
"urllib3>=1.26.18",
48-
"httpx>=0.27.0",
4949
],
5050
extras_require={
5151
"dev": [

src/unstructured_client/models/shared/partition_parameters.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
import dataclasses
55
from enum import Enum
66
from typing import List, Optional
7+
from unstructured_client import utils
78

89

9-
class ChunkingStrategy(str, Enum):
10+
class ChunkingStrategy(str, Enum, metaclass=utils.OpenEnumMeta):
1011
BASIC = 'basic'
1112
BY_PAGE = 'by_page'
1213
BY_SIMILARITY = 'by_similarity'
@@ -21,13 +22,13 @@ class Files:
2122

2223

2324

24-
class OutputFormat(str, Enum):
25+
class OutputFormat(str, Enum, metaclass=utils.OpenEnumMeta):
2526
r"""The format of the response. Supported formats are application/json and text/csv. Default: application/json."""
2627
APPLICATION_JSON = 'application/json'
2728
TEXT_CSV = 'text/csv'
2829

2930

30-
class Strategy(str, Enum):
31+
class Strategy(str, Enum, metaclass=utils.OpenEnumMeta):
3132
r"""The strategy to use for partitioning PDF/image. Options are fast, hi_res, auto. Default: auto"""
3233
FAST = 'fast'
3334
HI_RES = 'hi_res'
@@ -89,9 +90,7 @@ class PartitionParameters:
8990
strategy: Optional[Strategy] = dataclasses.field(default=Strategy.AUTO, metadata={'multipart_form': { 'field_name': 'strategy' }})
9091
r"""The strategy to use for partitioning PDF/image. Options are fast, hi_res, auto. Default: auto"""
9192
unique_element_ids: Optional[bool] = dataclasses.field(default=False, metadata={'multipart_form': { 'field_name': 'unique_element_ids' }})
92-
r"""When `True`, assign UUIDs to element IDs, which guarantees their uniqueness
93-
(useful when using them as primary keys in database). Otherwise a SHA-256 of element text is used. Default: False
94-
"""
93+
r"""When `True`, assign UUIDs to element IDs, which guarantees their uniqueness (useful when using them as primary keys in database). Otherwise a SHA-256 of element text is used. Default: False"""
9594
xml_keep_tags: Optional[bool] = dataclasses.field(default=False, metadata={'multipart_form': { 'field_name': 'xml_keep_tags' }})
9695
r"""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."""
9796

0 commit comments

Comments
 (0)