Skip to content

Commit

Permalink
chore: 🐝 Update SDK - Generate (#74)
Browse files Browse the repository at this point in the history
> [!IMPORTANT]
> Linting report available at:
<https://app.speakeasyapi.dev/org/unstructured/unstructured5xr/linting-report/3c0353c3aceec3c4106c4ca1349238dc>
# SDK update
Based on:
- OpenAPI Doc  
- Speakeasy CLI 1.277.4 (2.318.3)
https://github.com/speakeasy-api/speakeasy



## PYTHON CHANGELOG

## constsAndDefaults: 0.1.3 - 2024-03-01
### 🐛 Bug Fixes
- null enums are coerced into null consts *(commit by
[@disintegrator](https://github.com/disintegrator))*



## core: 4.6.5 - 2024-04-18
### 🐛 Bug Fixes
- make sure classes can't use `Undefined` reserved word *(commit by
[@TristanSpeakEasy](https://github.com/tristanspeakeasy))*



## unions: 2.82.6 - 2024-02-29
### 🐛 Bug Fixes
- null-enums are treated as switch a oneOf field to nullable *(commit by
[@disintegrator](https://github.com/disintegrator))*



## globalSecurity: 2.83.5 - 2024-03-15
### 🐛 Bug Fixes
- fixed hoisting of operation security *(commit by
[@TristanSpeakEasy](https://github.com/tristanspeakeasy))*



## globalServerURLs: 2.82.2 - 2024-03-06
### 🔧 Chores
- expand server selection test coverage *(commit by
[@2ynn](https://github.com/2ynn))*



## retries: 2.82.2 - 2024-04-10
### 🐛 Bug Fixes
- add method to correctly case retryConnectionErrors *bool for Python
generation *(commit by [@AshGodfrey](https://github.com/AshGodfrey))*



## nameOverrides: 2.81.2 - 2024-03-25
### 🐛 Bug Fixes
- x-speakeasy-name-overrides being missed when used under an allOf
*(commit by [@ThomasRooney](https://github.com/ThomasRooney))*



## examples: 2.81.3 - 2023-10-17
### 🔧 Chores
- remove multi word generated examples *(commit by
[@ThomasRooney](https://github.com/ThomasRooney))*



## responseFormat: 0.1.0 - 2024-03-02
### 🐝 New Features
- add support for response formats and flat responses *(commit by
[@TristanSpeakEasy](https://github.com/TristanSpeakeasy))*

Co-authored-by: speakeasybot <[email protected]>
  • Loading branch information
github-actions[bot] and speakeasybot committed May 2, 2024
1 parent ec16a2d commit 5a14dd4
Show file tree
Hide file tree
Showing 22 changed files with 251 additions and 108 deletions.
23 changes: 15 additions & 8 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
lockVersion: 2.0.0
id: 8b5fa338-9106-4734-abf0-e30d67044a90
management:
docChecksum: 666d45deb8d9066b8e19e04a305ca734
docVersion: 0.0.1
speakeasyVersion: 1.272.0
generationVersion: 2.312.1
releaseVersion: 0.23.3
configChecksum: 7aae705f3e8a728a15a7177fbca343ad
docChecksum: f6998ca683cdb4062d02e5e9308c4c75
docVersion: 1.0.25
speakeasyVersion: 1.277.4
generationVersion: 2.318.3
releaseVersion: 0.24.0
configChecksum: b7f7f456fc43b49fe96ef995812b1f3d
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:
constsAndDefaults: 0.1.3
core: 4.6.5
examples: 2.81.3
globalSecurity: 2.83.5
Expand All @@ -36,21 +37,27 @@ generatedFiles:
- src/unstructured_client/models/errors/sdkerror.py
- tests/helpers.py
- src/unstructured_client/models/operations/partition.py
- src/unstructured_client/models/errors/httpvalidationerror.py
- src/unstructured_client/models/shared/element.py
- src/unstructured_client/models/shared/validationerror.py
- src/unstructured_client/models/shared/partition_parameters.py
- src/unstructured_client/models/shared/security.py
- src/unstructured_client/models/errors/httpvalidationerror.py
- src/unstructured_client/models/__init__.py
- src/unstructured_client/models/errors/__init__.py
- src/unstructured_client/models/operations/__init__.py
- src/unstructured_client/models/shared/__init__.py
- docs/models/operations/partitionrequest.md
- docs/models/operations/partitionresponse.md
- docs/models/errors/httpvalidationerror.md
- docs/models/shared/metadata.md
- docs/models/shared/element.md
- docs/models/shared/loc.md
- docs/models/shared/validationerror.md
- docs/models/shared/chunkingstrategy.md
- docs/models/shared/files.md
- docs/models/shared/strategy.md
- docs/models/shared/partitionparameters.md
- docs/models/shared/security.md
- docs/models/errors/httpvalidationerror.md
- USAGE.md
- .gitattributes
- src/unstructured_client/_hooks/sdkhooks.py
Expand Down
30 changes: 30 additions & 0 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
speakeasyVersion: 1.277.4
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:2cdcca9104196029e8767d3ac942bdab59a10bc70f0ca20ee5f1c6d80599a298
sourceBlobDigest: sha256:6183911555010d6d2a654aa1923db737b87677cacfb2046f286575d48b993006
tags:
- latest
targets:
unstructured-python:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:2cdcca9104196029e8767d3ac942bdab59a10bc70f0ca20ee5f1c6d80599a298
sourceBlobDigest: sha256:6183911555010d6d2a654aa1923db737b87677cacfb2046f286575d48b993006
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
my-source:
inputs:
- location: https://api.unstructured.io/general/openapi.json
overlays:
- location: ./overlay_client.yaml
registry:
location: registry.speakeasyapi.dev/unstructured/unstructured5xr/my-source
targets:
unstructured-python:
target: python
source: my-source
6 changes: 3 additions & 3 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
my-source:
inputs:
- location: https://api.unstructured.io/general/openapi.json
overlays:
- location: ./overlay_client.yaml
registry:
location: registry.speakeasyapi.dev/unstructured/unstructured5xr/my-source
targets:
unstructured-python:
target: python
source: my-source
# publish:
# pypi:
# token: $PYPI_TOKEN
10 changes: 9 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,4 +490,12 @@ Based on:
- OpenAPI Doc
- Speakeasy CLI 1.241.0 (2.300.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.23.1] .
- [python v0.23.1] .

## 2024-05-02 00:19:08
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.277.4 (2.318.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.24.0] .
34 changes: 10 additions & 24 deletions USAGE.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,25 @@
<!-- Start SDK Example Usage [usage] -->
```python
import unstructured_client
from unstructured_client.models import shared
from unstructured_client.models import operations, shared

s = unstructured_client.UnstructuredClient(
api_key_auth="YOUR_API_KEY",
)

req = shared.PartitionParameters(
chunking_strategy='by_title',
combine_under_n_chars=500,
encoding='utf-8',
extract_image_block_types=[
'image',
'table',
],
gz_uncompressed_content_type='application/pdf',
hi_res_model_name='yolox',
languages=[
'[',
'e',
'n',
'g',
']',
],
max_characters=1500,
new_after_n_chars=1500,
output_format='application/json',
overlap=25,
strategy='hi_res',
req = operations.PartitionRequest(
partition_parameters=shared.PartitionParameters(
files=shared.Files(
content='0x2cC94b2FEF'.encode(),
file_name='um.shtml',
),
strategy=shared.Strategy.HI_RES,
),
)

res = s.general.partition(req)

if res.elements is not None:
if res.response_partition_parameters is not None:
# handle response
pass

Expand Down
9 changes: 9 additions & 0 deletions docs/models/operations/partitionrequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# PartitionRequest


## Fields

| Field | Type | Required | Description |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `partition_parameters` | [shared.PartitionParameters](../../models/shared/partitionparameters.md) | :heavy_check_mark: | N/A |
| `unstructured_api_key` | *Optional[str]* | :heavy_minus_sign: | N/A |
2 changes: 1 addition & 1 deletion docs/models/operations/partitionresponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
| `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 |
| `elements` | List[*Any*] | :heavy_minus_sign: | Successful Response |
| `response_partition_parameters` | List[[shared.Element](../../models/shared/element.md)] | :heavy_minus_sign: | Successful Response |
11 changes: 11 additions & 0 deletions docs/models/shared/chunkingstrategy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ChunkingStrategy


## Values

| Name | Value |
| --------------- | --------------- |
| `BASIC` | basic |
| `BY_PAGE` | by_page |
| `BY_SIMILARITY` | by_similarity |
| `BY_TITLE` | by_title |
11 changes: 11 additions & 0 deletions docs/models/shared/element.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Element


## Fields

| Field | Type | Required | Description |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `element_id` | *str* | :heavy_check_mark: | N/A |
| `metadata` | [shared.Metadata](../../models/shared/metadata.md) | :heavy_check_mark: | N/A |
| `text` | *str* | :heavy_check_mark: | N/A |
| `type` | *str* | :heavy_check_mark: | N/A |
7 changes: 7 additions & 0 deletions docs/models/shared/metadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Metadata


## Fields

| Field | Type | Required | Description |
| ----------- | ----------- | ----------- | ----------- |
Loading

0 comments on commit 5a14dd4

Please sign in to comment.