Skip to content
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
33 changes: 20 additions & 13 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: 3e52fdac3e417f8e48fcb920b829025c
docVersion: 1.1.34
speakeasyVersion: 1.552.0
generationVersion: 2.610.0
releaseVersion: 0.39.1
configChecksum: 2b0094ee827eb2deb71ef0ff9e572192
docChecksum: 0593f5359a35b34f3dc1b346490deff2
docVersion: 1.1.39
speakeasyVersion: 1.568.0
generationVersion: 2.632.2
releaseVersion: 0.40.0
configChecksum: 70954879fd1a6da62295461541e8680c
repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git
repoSubDirectory: .
installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git
Expand All @@ -16,7 +16,7 @@ features:
acceptHeaders: 3.0.0
additionalDependencies: 1.0.0
constsAndDefaults: 1.0.5
core: 5.19.0
core: 5.19.3
customCodeRegions: 0.1.1
defaultEnabledRetries: 0.2.0
enumUnions: 0.1.0
Expand All @@ -33,7 +33,7 @@ features:
openEnums: 1.0.1
responseFormat: 1.0.1
retries: 3.0.2
sdkHooks: 1.0.1
sdkHooks: 1.1.0
serverIDs: 3.0.0
unions: 3.0.4
uploadStreams: 1.0.0
Expand Down Expand Up @@ -71,6 +71,8 @@ generatedFiles:
- docs/models/operations/getconnectionchecksourcesresponse.md
- docs/models/operations/getdestinationrequest.md
- docs/models/operations/getdestinationresponse.md
- docs/models/operations/getencryptioncertificaterequest.md
- docs/models/operations/getencryptioncertificateresponse.md
- docs/models/operations/getjobdetailsrequest.md
- docs/models/operations/getjobdetailsresponse.md
- docs/models/operations/getjobfailedfilesrequest.md
Expand All @@ -91,8 +93,6 @@ generatedFiles:
- docs/models/operations/listworkflowsresponse.md
- docs/models/operations/partitionrequest.md
- docs/models/operations/partitionresponse.md
- docs/models/operations/retrieverequest.md
- docs/models/operations/retrieveresponse.md
- docs/models/operations/runworkflowrequest.md
- docs/models/operations/runworkflowresponse.md
- docs/models/operations/storesecretrequest.md
Expand Down Expand Up @@ -140,6 +140,7 @@ generatedFiles:
- docs/models/shared/elasticsearchconnectorconfig.md
- docs/models/shared/elasticsearchconnectorconfiginput.md
- docs/models/shared/encryptedsecret.md
- docs/models/shared/encryptioncertificateresponse.md
- docs/models/shared/encryptiontype.md
- docs/models/shared/failedfile.md
- docs/models/shared/files.md
Expand Down Expand Up @@ -181,7 +182,6 @@ generatedFiles:
- docs/models/shared/outlooksourceconnectorconfiginput.md
- docs/models/shared/outputformat.md
- docs/models/shared/partitionparameters.md
- docs/models/shared/pemauthresponse.md
- docs/models/shared/pineconedestinationconnectorconfig.md
- docs/models/shared/pineconedestinationconnectorconfiginput.md
- docs/models/shared/postgresdestinationconnectorconfig.md
Expand Down Expand Up @@ -272,6 +272,7 @@ generatedFiles:
- src/unstructured_client/models/operations/get_connection_check_destinations.py
- src/unstructured_client/models/operations/get_connection_check_sources.py
- src/unstructured_client/models/operations/get_destination.py
- src/unstructured_client/models/operations/get_encryption_certificate.py
- src/unstructured_client/models/operations/get_job.py
- src/unstructured_client/models/operations/get_job_details.py
- src/unstructured_client/models/operations/get_job_failed_files.py
Expand All @@ -282,7 +283,6 @@ generatedFiles:
- src/unstructured_client/models/operations/list_sources.py
- src/unstructured_client/models/operations/list_workflows.py
- src/unstructured_client/models/operations/partition.py
- src/unstructured_client/models/operations/retrieve.py
- src/unstructured_client/models/operations/run_workflow.py
- src/unstructured_client/models/operations/store_secret.py
- src/unstructured_client/models/operations/update_destination.py
Expand Down Expand Up @@ -323,6 +323,7 @@ generatedFiles:
- src/unstructured_client/models/shared/elasticsearchconnectorconfig.py
- src/unstructured_client/models/shared/elasticsearchconnectorconfiginput.py
- src/unstructured_client/models/shared/encryptedsecret.py
- src/unstructured_client/models/shared/encryptioncertificateresponse.py
- src/unstructured_client/models/shared/encryptiontype.py
- src/unstructured_client/models/shared/failedfile.py
- src/unstructured_client/models/shared/gcsdestinationconnectorconfig.py
Expand Down Expand Up @@ -359,7 +360,6 @@ generatedFiles:
- src/unstructured_client/models/shared/outlooksourceconnectorconfig.py
- src/unstructured_client/models/shared/outlooksourceconnectorconfiginput.py
- src/unstructured_client/models/shared/partition_parameters.py
- src/unstructured_client/models/shared/pemauthresponse.py
- src/unstructured_client/models/shared/pineconedestinationconnectorconfig.py
- src/unstructured_client/models/shared/pineconedestinationconnectorconfiginput.py
- src/unstructured_client/models/shared/postgresdestinationconnectorconfig.py
Expand Down Expand Up @@ -709,5 +709,12 @@ examples:
application/json: {"id": "<id>"}
"422":
application/json: {"detail": []}
get_encryption_certificate:
speakeasy-default-get-encryption-certificate:
responses:
"200":
application/json: {"ca_chain": "<value>", "encryption_certificate": "<value>"}
"422":
application/json: {"detail": []}
examplesVersion: 1.0.2
generatedTests: {}
22 changes: 5 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ with UnstructuredClient() as uc_client:

</br>

The same SDK client can also be used to make asynchronous requests by importing asyncio.
The same SDK client can also be used to make asychronous requests by importing asyncio.
```python
# Asynchronous Example
import asyncio
Expand Down Expand Up @@ -410,30 +410,18 @@ Certain SDK methods accept file objects as part of a request body or multi-part

```python
from unstructured_client import UnstructuredClient
from unstructured_client.models import shared


with UnstructuredClient() as uc_client:

res = uc_client.general.partition(request={
"partition_parameters": {
"files": {
"content": open("example.file", "rb"),
"file_name": "example.file",
},
"split_pdf_page_range": [
1,
10,
],
"vlm_model": shared.VLMModel.GPT_4O,
"vlm_model_provider": shared.VLMModelProvider.OPENAI,
},
res = uc_client.workflows.run_workflow(request={
"workflow_id": "e7054f23-ce92-4bf1-a1d7-7cf9cb14d013",
})

assert res.elements is not None
assert res.job_information is not None

# Handle response
print(res.elements)
print(res.job_information)

```
<!-- End File uploads [file-upload] -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RetrieveRequest
# GetEncryptionCertificateRequest


## Fields
Expand Down
11 changes: 11 additions & 0 deletions docs/models/operations/getencryptioncertificateresponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# GetEncryptionCertificateResponse


## Fields

| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
| `encryption_certificate_response` | [Optional[shared.EncryptionCertificateResponse]](../../models/shared/encryptioncertificateresponse.md) | :heavy_minus_sign: | Successful Response |
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
11 changes: 0 additions & 11 deletions docs/models/operations/retrieveresponse.md

This file was deleted.

13 changes: 13 additions & 0 deletions docs/models/shared/encryptioncertificateresponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# EncryptionCertificateResponse

Response model for the encryption certificate.
Contains the siged user certificate and the root CA certificate
for verification.


## Fields

| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `ca_chain` | *str* | :heavy_check_mark: | N/A |
| `encryption_certificate` | *str* | :heavy_check_mark: | N/A |
12 changes: 0 additions & 12 deletions docs/models/shared/pemauthresponse.md

This file was deleted.

3 changes: 3 additions & 0 deletions docs/sdks/general/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ with UnstructuredClient() as uc_client:

res = uc_client.general.partition(request={
"partition_parameters": {
"chunking_strategy": "by_title",
"files": {
"content": open("example.file", "rb"),
"file_name": "example.file",
},
"split_pdf_cache_tmp_data_dir": "<value>",
"split_pdf_page_range": [
1,
10,
],
"strategy": shared.Strategy.AUTO,
"vlm_model": shared.VLMModel.GPT_4O,
"vlm_model_provider": shared.VLMModelProvider.OPENAI,
},
Expand Down
24 changes: 12 additions & 12 deletions docs/sdks/users/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

### Available Operations

* [retrieve](#retrieve) - Retrieve PEM Key
* [get_encryption_certificate](#get_encryption_certificate) - Retrieve the user's public key for encryption.
* [store_secret](#store_secret) - Store an encrypted secret

## retrieve
## get_encryption_certificate

Given a UNSTRUCTURED_API_KEY in the post-payload, retrieve the associated PEM key
Retrieve a short lived certificate with the public key for encrypting secrets.

### Example Usage

Expand All @@ -20,26 +20,26 @@ from unstructured_client import UnstructuredClient

with UnstructuredClient() as uc_client:

res = uc_client.users.retrieve(request={})
res = uc_client.users.get_encryption_certificate(request={})

assert res.pem_auth_response is not None
assert res.encryption_certificate_response is not None

# Handle response
print(res.pem_auth_response)
print(res.encryption_certificate_response)

```

### Parameters

| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `request` | [operations.RetrieveRequest](../../models/operations/retrieverequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
| `server_url` | *Optional[str]* | :heavy_minus_sign: | An optional server URL to use. |
| Parameter | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `request` | [operations.GetEncryptionCertificateRequest](../../models/operations/getencryptioncertificaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
| `server_url` | *Optional[str]* | :heavy_minus_sign: | An optional server URL to use. |

### Response

**[operations.RetrieveResponse](../../models/operations/retrieveresponse.md)**
**[operations.GetEncryptionCertificateResponse](../../models/operations/getencryptioncertificateresponse.md)**

### Errors

Expand Down
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ generation:
oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false
python:
version: 0.39.1
version: 0.40.0
additionalDependencies:
dev:
deepdiff: '>=6.0'
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[project]
name = "unstructured-client"
version = "0.39.1"
version = "0.40.0"
description = "Python Client SDK for Unstructured API"
authors = [{ name = "Unstructured" },]
readme = "README-PYPI.md"
requires-python = ">=3.9.2"
dependencies = [
"aiofiles >=24.1.0",
"cryptography >=3.1",
"httpcore >=1.0.9",
"httpx >=0.27.0",
"nest-asyncio >=1.6.0",
"pydantic >=2.11.2",
Expand Down Expand Up @@ -52,6 +53,8 @@ pythonpath = ["src"]

[tool.mypy]
disable_error_code = "misc"
explicit_package_bases = true
mypy_path = "src"

[[tool.mypy.overrides]]
module = "typing_inspect"
Expand Down
Loading