Skip to content

chore: 🐝 Update SDK - Generate #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 8b5fa338-9106-4734-abf0-e30d67044a90
management:
docChecksum: 3956d4428b6275f96d6859db352f202f
docVersion: 1.0.30
speakeasyVersion: 1.295.1
generationVersion: 2.335.5
releaseVersion: 0.26.5
configChecksum: 06b34b8ab68e59b2fec780ed1663e371
docChecksum: 95cf473b65c812e2a731bc586e691f89
docVersion: 1.0.32
speakeasyVersion: 1.299.4
generationVersion: 2.338.7
releaseVersion: 0.27.0
configChecksum: f30a94fe7726e498bf687d6aefa48ec4
repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git
repoSubDirectory: .
installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git
Expand All @@ -23,6 +23,7 @@ features:
globalServerURLs: 2.82.2
nameOverrides: 2.81.2
nullables: 0.1.0
openEnums: 0.1.0
responseFormat: 0.1.0
retries: 2.82.2
sdkHooks: 0.1.0
Expand All @@ -37,6 +38,7 @@ generatedFiles:
- setup.py
- src/unstructured_client/__init__.py
- src/unstructured_client/utils/__init__.py
- src/unstructured_client/utils/enums.py
- src/unstructured_client/utils/retries.py
- src/unstructured_client/utils/utils.py
- src/unstructured_client/models/errors/sdkerror.py
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
speakeasyVersion: 1.295.1
speakeasyVersion: 1.299.4
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:bad4b97e6b725d31784534a0eb12c6a679f8b9c266ab6ac6233157c86df73900
sourceBlobDigest: sha256:68a72efa165cf4635ab30f872a9b6e3a2057cdcc689254bb96feb30c7b7970bd
sourceRevisionDigest: sha256:1f77ecb5a93c98a2666959cc431213df275eb3daf04c08c78f76b4d28579d765
sourceBlobDigest: sha256:823dd5db79564693f9fe02a562840c3fe02a6cd546917e9bac7aecd60dd8c260
tags:
- latest
- main
targets:
unstructured-python:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:bad4b97e6b725d31784534a0eb12c6a679f8b9c266ab6ac6233157c86df73900
sourceBlobDigest: sha256:68a72efa165cf4635ab30f872a9b6e3a2057cdcc689254bb96feb30c7b7970bd
sourceRevisionDigest: sha256:1f77ecb5a93c98a2666959cc431213df275eb3daf04c08c78f76b4d28579d765
sourceBlobDigest: sha256:823dd5db79564693f9fe02a562840c3fe02a6cd546917e9bac7aecd60dd8c260
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ res = s.general.partition(request=operations.PartitionRequest(
partition_parameters=shared.PartitionParameters(
files=shared.Files(
content='0x2cC94b2FEF'.encode(),
file_name='um.shtml',
file_name='your_file_here',
),
strategy=shared.Strategy.HI_RES,
strategy=shared.Strategy.AUTO,
),
))

Expand Down
10 changes: 9 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,4 +554,12 @@ Based on:
- OpenAPI Doc
- Speakeasy CLI 1.295.1 (2.335.5) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.26.5] .
- [python v0.26.5] .

## 2024-06-03 00:52:27
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.299.4 (2.338.7) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.27.0] .
4 changes: 2 additions & 2 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ res = s.general.partition(request=operations.PartitionRequest(
partition_parameters=shared.PartitionParameters(
files=shared.Files(
content='0x2cC94b2FEF'.encode(),
file_name='um.shtml',
file_name='your_file_here',
),
strategy=shared.Strategy.HI_RES,
strategy=shared.Strategy.AUTO,
),
))

Expand Down
6 changes: 3 additions & 3 deletions codeSamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ actions:
res = s.general.partition(request=operations.PartitionRequest(
partition_parameters=shared.PartitionParameters(
files=shared.Files(
file_name='and.wav',
content='0xb2FEF2EFFf'.encode(),
file_name='your_file_here',
content='0x2cC94b2FEF'.encode(),
),
strategy=shared.Strategy.HI_RES,
strategy=shared.Strategy.AUTO,
),
))

Expand Down
2 changes: 1 addition & 1 deletion docs/models/shared/partitionparameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
| `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. | |
| `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. | |
| `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 |
| `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 | |
| `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 | |
| `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. | |
10 changes: 5 additions & 5 deletions gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
python:
version: 0.26.5
version: 0.27.0
additionalDependencies:
dependencies:
deepdiff: ">=6.0"
pypdf: ">=4.0"
requests-toolbelt: ">=1.0.0"
httpx: ">=0.27.0"
deepdiff: '>=6.0'
httpx: '>=0.27.0'
pypdf: '>=4.0'
requests-toolbelt: '>=1.0.0'
extraDependencies:
dev: {}
author: Unstructured
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

setuptools.setup(
name='unstructured-client',
version='0.26.5',
version='0.27.0',
author='Unstructured',
description='Python Client SDK for Unstructured API',
license = 'MIT',
Expand All @@ -32,6 +32,7 @@
"charset-normalizer>=3.2.0",
"dataclasses-json>=0.6.4",
"deepdiff>=6.0",
"httpx>=0.27.0",
"idna>=3.4",
"jsonpath-python>=1.0.6",
"marshmallow>=3.19.0",
Expand All @@ -45,7 +46,6 @@
"typing-inspect>=0.9.0",
"typing_extensions>=4.7.1",
"urllib3>=1.26.18",
"httpx>=0.27.0",
],
extras_require={
"dev": [
Expand Down
11 changes: 5 additions & 6 deletions src/unstructured_client/models/shared/partition_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
import dataclasses
from enum import Enum
from typing import List, Optional
from unstructured_client import utils


class ChunkingStrategy(str, Enum):
class ChunkingStrategy(str, Enum, metaclass=utils.OpenEnumMeta):
BASIC = 'basic'
BY_PAGE = 'by_page'
BY_SIMILARITY = 'by_similarity'
Expand All @@ -21,13 +22,13 @@ class Files:



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


class Strategy(str, Enum):
class Strategy(str, Enum, metaclass=utils.OpenEnumMeta):
r"""The strategy to use for partitioning PDF/image. Options are fast, hi_res, auto. Default: auto"""
FAST = 'fast'
HI_RES = 'hi_res'
Expand Down Expand Up @@ -89,9 +90,7 @@ class PartitionParameters:
strategy: Optional[Strategy] = dataclasses.field(default=Strategy.AUTO, metadata={'multipart_form': { 'field_name': 'strategy' }})
r"""The strategy to use for partitioning PDF/image. Options are fast, hi_res, auto. Default: auto"""
unique_element_ids: Optional[bool] = dataclasses.field(default=False, metadata={'multipart_form': { 'field_name': 'unique_element_ids' }})
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
"""
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"""
xml_keep_tags: Optional[bool] = dataclasses.field(default=False, metadata={'multipart_form': { 'field_name': 'xml_keep_tags' }})
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."""

Expand Down
8 changes: 4 additions & 4 deletions src/unstructured_client/sdkconfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ class SDKConfiguration:
server_url: Optional[str] = ''
server: Optional[str] = ''
language: str = 'python'
openapi_doc_version: str = '1.0.30'
sdk_version: str = '0.26.5'
gen_version: str = '2.335.5'
user_agent: str = 'speakeasy-sdk/python 0.26.5 2.335.5 1.0.30 unstructured-client'
openapi_doc_version: str = '1.0.32'
sdk_version: str = '0.27.0'
gen_version: str = '2.338.7'
user_agent: str = 'speakeasy-sdk/python 0.27.0 2.338.7 1.0.32 unstructured-client'
retry_config: Optional[RetryConfig] = None

def __post_init__(self):
Expand Down
2 changes: 2 additions & 0 deletions src/unstructured_client/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

from .retries import *
from .utils import *
from .enums import *

17 changes: 17 additions & 0 deletions src/unstructured_client/utils/enums.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""

import enum

class OpenEnumMeta(enum.EnumMeta):
def __call__(cls, value, names=None, *, module=None, qualname=None, type=None, start=1):
# The `type` kwarg also happens to be a built-in that pylint flags as
# redeclared. Safe to ignore this lint rule with this scope.
# pylint: disable=redefined-builtin

if names is not None:
return super().__call__(value, names=names, module=module, qualname=qualname, type=type, start=start)

try:
return super().__call__(value, names=names, module=module, qualname=qualname, type=type, start=start)
except ValueError:
return value