Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env.local
**/__pycache__/
**/.speakeasy/temp/
**/.speakeasy/logs/
Expand Down
46 changes: 36 additions & 10 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: 8038a5b9e376d44bad2fd4c117922954
docVersion: 1.1.45
docChecksum: 7a349f081ce7703ab46bee35b64feb32
docVersion: 1.2.10
speakeasyVersion: 1.601.0
generationVersion: 2.680.0
releaseVersion: 0.42.3
configChecksum: 3d02dd7ca437781b3d721fab5d7b9adc
releaseVersion: 0.42.5
configChecksum: f65c47c497403c61234987cadd6fbbb9
repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git
repoSubDirectory: .
installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git
Expand All @@ -26,6 +26,7 @@ features:
globalSecurityCallbacks: 1.0.0
globalSecurityFlattening: 1.0.0
globalServerURLs: 3.1.1
methodSecurity: 3.0.1
multipartFileContentType: 1.0.0
nameOverrides: 3.0.1
nullables: 1.0.1
Expand All @@ -45,58 +46,84 @@ generatedFiles:
- docs/models/errors/servererror.md
- docs/models/operations/canceljobrequest.md
- docs/models/operations/canceljobresponse.md
- docs/models/operations/canceljobsecurity.md
- docs/models/operations/createconnectioncheckdestinationsrequest.md
- docs/models/operations/createconnectioncheckdestinationsresponse.md
- docs/models/operations/createconnectioncheckdestinationssecurity.md
- docs/models/operations/createconnectionchecksourcesrequest.md
- docs/models/operations/createconnectionchecksourcesresponse.md
- docs/models/operations/createconnectionchecksourcessecurity.md
- docs/models/operations/createdestinationrequest.md
- docs/models/operations/createdestinationresponse.md
- docs/models/operations/createdestinationsecurity.md
- docs/models/operations/createsourcerequest.md
- docs/models/operations/createsourceresponse.md
- docs/models/operations/createsourcesecurity.md
- docs/models/operations/createworkflowrequest.md
- docs/models/operations/createworkflowresponse.md
- docs/models/operations/createworkflowsecurity.md
- docs/models/operations/deletedestinationrequest.md
- docs/models/operations/deletedestinationresponse.md
- docs/models/operations/deletedestinationsecurity.md
- docs/models/operations/deletesourcerequest.md
- docs/models/operations/deletesourceresponse.md
- docs/models/operations/deletesourcesecurity.md
- docs/models/operations/deleteworkflowrequest.md
- docs/models/operations/deleteworkflowresponse.md
- docs/models/operations/deleteworkflowsecurity.md
- docs/models/operations/downloadjoboutputrequest.md
- docs/models/operations/downloadjoboutputresponse.md
- docs/models/operations/downloadjoboutputsecurity.md
- docs/models/operations/getconnectioncheckdestinationsrequest.md
- docs/models/operations/getconnectioncheckdestinationsresponse.md
- docs/models/operations/getconnectioncheckdestinationssecurity.md
- docs/models/operations/getconnectionchecksourcesrequest.md
- docs/models/operations/getconnectionchecksourcesresponse.md
- docs/models/operations/getconnectionchecksourcessecurity.md
- docs/models/operations/getdestinationrequest.md
- docs/models/operations/getdestinationresponse.md
- docs/models/operations/getdestinationsecurity.md
- docs/models/operations/getjobdetailsrequest.md
- docs/models/operations/getjobdetailsresponse.md
- docs/models/operations/getjobdetailssecurity.md
- docs/models/operations/getjobfailedfilesrequest.md
- docs/models/operations/getjobfailedfilesresponse.md
- docs/models/operations/getjobfailedfilessecurity.md
- docs/models/operations/getjobrequest.md
- docs/models/operations/getjobresponse.md
- docs/models/operations/getjobsecurity.md
- docs/models/operations/getsourcerequest.md
- docs/models/operations/getsourceresponse.md
- docs/models/operations/getsourcesecurity.md
- docs/models/operations/getworkflowrequest.md
- docs/models/operations/getworkflowresponse.md
- docs/models/operations/getworkflowsecurity.md
- docs/models/operations/listdestinationsrequest.md
- docs/models/operations/listdestinationsresponse.md
- docs/models/operations/listdestinationssecurity.md
- docs/models/operations/listjobsrequest.md
- docs/models/operations/listjobsresponse.md
- docs/models/operations/listjobssecurity.md
- docs/models/operations/listsourcesrequest.md
- docs/models/operations/listsourcesresponse.md
- docs/models/operations/listsourcessecurity.md
- docs/models/operations/listworkflowsrequest.md
- docs/models/operations/listworkflowsresponse.md
- docs/models/operations/listworkflowssecurity.md
- docs/models/operations/partitionrequest.md
- docs/models/operations/partitionresponse.md
- docs/models/operations/runworkflowrequest.md
- docs/models/operations/runworkflowresponse.md
- docs/models/operations/runworkflowsecurity.md
- docs/models/operations/updatedestinationrequest.md
- docs/models/operations/updatedestinationresponse.md
- docs/models/operations/updatedestinationsecurity.md
- docs/models/operations/updatesourcerequest.md
- docs/models/operations/updatesourceresponse.md
- docs/models/operations/updatesourcesecurity.md
- docs/models/operations/updateworkflowrequest.md
- docs/models/operations/updateworkflowresponse.md
- docs/models/operations/updateworkflowsecurity.md
- docs/models/shared/astradbconnectorconfig.md
- docs/models/shared/astradbconnectorconfiginput.md
- docs/models/shared/azureaisearchconnectorconfig.md
Expand Down Expand Up @@ -212,7 +239,6 @@ generatedFiles:
- docs/models/shared/updateworkflow.md
- docs/models/shared/updateworkflowschedule.md
- docs/models/shared/validationerror.md
- docs/models/shared/vlmmodel.md
- docs/models/shared/vlmmodelprovider.md
- docs/models/shared/weaviatedestinationconnectorconfig.md
- docs/models/shared/weaviatedestinationconnectorconfiginput.md
Expand Down Expand Up @@ -600,7 +626,7 @@ examples:
application/json: {"name": "<value>", "workflow_type": "advanced"}
responses:
"200":
application/json: {"created_at": "2023-01-15T13:52:58.634Z", "destinations": [], "id": "80c8c72f-101a-4a39-974b-49aa299e80d3", "name": "<value>", "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": ["47678eb0-4958-4341-ad66-b1b822c1deb9"], "status": "active", "workflow_nodes": [{"name": "<value>", "subtype": "<value>", "type": "<value>"}, {"name": "<value>", "subtype": "<value>", "type": "<value>"}]}
application/json: {"created_at": "2023-01-15T13:52:58.634Z", "destinations": [], "id": "80c8c72f-101a-4a39-974b-49aa299e80d3", "name": "<value>", "reprocess_all": false, "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": ["47678eb0-4958-4341-ad66-b1b822c1deb9"], "status": "active", "workflow_nodes": [{"name": "<value>", "subtype": "<value>", "type": "<value>"}, {"name": "<value>", "subtype": "<value>", "type": "<value>"}]}
"422":
application/json: {"detail": "<value>"}
delete_workflow:
Expand All @@ -620,7 +646,7 @@ examples:
workflow_id: "d031b0e5-7ca7-4a2b-b3cc-d869d2df3e76"
responses:
"200":
application/json: {"created_at": "2024-01-22T17:42:53.375Z", "destinations": ["624abbf1-dbce-4fe0-8d3f-0673956fc10e"], "id": "840c33c3-f30c-4908-9688-2682ed8eea3f", "name": "<value>", "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": ["349ed27a-eeda-4851-866a-8ce3a65a2957", "9aa34544-3278-446f-a265-efcaa55f9c4a"], "status": "active", "workflow_nodes": [{"name": "<value>", "subtype": "<value>", "type": "<value>"}, {"name": "<value>", "subtype": "<value>", "type": "<value>"}]}
application/json: {"created_at": "2024-01-22T17:42:53.375Z", "destinations": ["624abbf1-dbce-4fe0-8d3f-0673956fc10e"], "id": "840c33c3-f30c-4908-9688-2682ed8eea3f", "name": "<value>", "reprocess_all": false, "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": ["349ed27a-eeda-4851-866a-8ce3a65a2957", "9aa34544-3278-446f-a265-efcaa55f9c4a"], "status": "active", "workflow_nodes": [{"name": "<value>", "subtype": "<value>", "type": "<value>"}, {"name": "<value>", "subtype": "<value>", "type": "<value>"}]}
"422":
application/json: {"detail": "<value>"}
list_workflows:
Expand All @@ -630,7 +656,7 @@ examples:
sort_by: "id"
responses:
"200":
application/json: [{"created_at": "2023-09-02T04:21:23.162Z", "destinations": [], "id": "1e4c63cf-6a6b-407b-b993-b2bc8b3bcefc", "name": "<value>", "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": ["2e12d926-4caf-4cce-8b5c-3e16722c1c84"], "status": "inactive", "workflow_nodes": [{"name": "<value>", "subtype": "<value>", "type": "<value>"}, {"name": "<value>", "subtype": "<value>", "type": "<value>"}]}, {"created_at": "2023-09-02T04:21:23.162Z", "destinations": [], "id": "1e4c63cf-6a6b-407b-b993-b2bc8b3bcefc", "name": "<value>", "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": ["2e12d926-4caf-4cce-8b5c-3e16722c1c84"], "status": "inactive", "workflow_nodes": [{"name": "<value>", "subtype": "<value>", "type": "<value>"}, {"name": "<value>", "subtype": "<value>", "type": "<value>"}]}]
application/json: [{"created_at": "2023-09-02T04:21:23.162Z", "destinations": [], "id": "1e4c63cf-6a6b-407b-b993-b2bc8b3bcefc", "name": "<value>", "reprocess_all": false, "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": ["2e12d926-4caf-4cce-8b5c-3e16722c1c84"], "status": "inactive", "workflow_nodes": [{"name": "<value>", "subtype": "<value>", "type": "<value>"}, {"name": "<value>", "subtype": "<value>", "type": "<value>"}]}, {"created_at": "2023-09-02T04:21:23.162Z", "destinations": [], "id": "1e4c63cf-6a6b-407b-b993-b2bc8b3bcefc", "name": "<value>", "reprocess_all": false, "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": ["2e12d926-4caf-4cce-8b5c-3e16722c1c84"], "status": "inactive", "workflow_nodes": [{"name": "<value>", "subtype": "<value>", "type": "<value>"}, {"name": "<value>", "subtype": "<value>", "type": "<value>"}]}]
"422":
application/json: {"detail": [{"loc": ["<value>", 864403], "msg": "<value>", "type": "<value>"}]}
run_workflow:
Expand All @@ -652,13 +678,13 @@ examples:
application/json: {}
responses:
"200":
application/json: {"created_at": "2025-01-11T03:06:48.390Z", "destinations": [], "id": "88fd9cfe-ed29-4701-9d1f-8f26d4ea88d3", "name": "<value>", "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": ["0957eb7f-57d3-4705-bc49-03de6ad3794d", "a8b88099-9065-4458-a824-b37da7a9bccf", "a024c482-10ba-433a-9100-e6471e9d3db0"], "status": "active", "workflow_nodes": [{"name": "<value>", "subtype": "<value>", "type": "<value>"}]}
application/json: {"created_at": "2025-01-11T03:06:48.390Z", "destinations": [], "id": "88fd9cfe-ed29-4701-9d1f-8f26d4ea88d3", "name": "<value>", "reprocess_all": false, "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": ["0957eb7f-57d3-4705-bc49-03de6ad3794d", "a8b88099-9065-4458-a824-b37da7a9bccf", "a024c482-10ba-433a-9100-e6471e9d3db0"], "status": "active", "workflow_nodes": [{"name": "<value>", "subtype": "<value>", "type": "<value>"}]}
"422":
application/json: {"detail": "<value>"}
partition:
speakeasy-default-partition:
requestBody:
multipart/form-data: {"chunking_strategy": "by_title", "combine_under_n_chars": null, "content_type": null, "coordinates": false, "encoding": null, "files": {"": "{\"summary\":\"File to be partitioned\",\"externalValue\":\"https://github.com/Unstructured-IO/unstructured/blob/98d3541909f64290b5efb65a226fc3ee8a7cc5ee/example-docs/layout-parser-paper.pdf\"}"}, "gz_uncompressed_content_type": null, "hi_res_model_name": null, "include_orig_elements": null, "include_page_breaks": false, "include_slide_notes": true, "max_characters": null, "multipage_sections": true, "new_after_n_chars": null, "output_format": "application/json", "overlap": 0, "overlap_all": false, "pdf_infer_table_structure": true, "pdfminer_char_margin": null, "pdfminer_line_margin": null, "pdfminer_line_overlap": null, "pdfminer_word_margin": null, "similarity_threshold": null, "split_pdf_allow_failed": false, "split_pdf_cache_tmp_data": false, "split_pdf_cache_tmp_data_dir": "<value>", "split_pdf_concurrency_level": 5, "split_pdf_page": true, "split_pdf_page_range": [1, 10], "starting_page_number": null, "strategy": "auto", "table_ocr_agent": null, "unique_element_ids": false, "vlm_model": "gpt-4o", "vlm_model_provider": "openai", "xml_keep_tags": false}
multipart/form-data: {"chunking_strategy": "by_title", "combine_under_n_chars": null, "content_type": null, "coordinates": false, "do_not_break_similarity_on_footer_header": false, "encoding": null, "files": {"": "{\"summary\":\"File to be partitioned\",\"externalValue\":\"https://github.com/Unstructured-IO/unstructured/blob/98d3541909f64290b5efb65a226fc3ee8a7cc5ee/example-docs/layout-parser-paper.pdf\"}"}, "gz_uncompressed_content_type": null, "hi_res_model_name": null, "include_orig_elements": null, "include_page_breaks": false, "include_slide_notes": true, "max_characters": null, "multipage_sections": true, "new_after_n_chars": null, "output_format": "application/json", "overlap": 0, "overlap_all": false, "pdf_infer_table_structure": true, "pdfminer_char_margin": null, "pdfminer_line_margin": null, "pdfminer_line_overlap": null, "pdfminer_word_margin": null, "similarity_threshold": null, "split_pdf_allow_failed": false, "split_pdf_cache_tmp_data": false, "split_pdf_cache_tmp_data_dir": "<value>", "split_pdf_concurrency_level": 5, "split_pdf_page": true, "split_pdf_page_range": [1, 10], "starting_page_number": null, "strategy": "auto", "table_ocr_agent": null, "unique_element_ids": false, "vlm_model": "gpt-4o", "vlm_model_provider": "openai", "xml_keep_tags": false}
responses:
"200":
application/json: [{"type": "Title", "element_id": "6aa0ff22f91bbe7e26e8e25ca8052acd", "text": "LayoutParser: A Unified Toolkit for Deep Learning Based Document Image Analysis", "metadata": {"languages": ["eng"], "page_number": 1, "filename": "layout-parser-paper.pdf", "filetype": "application/pdf"}}]
Expand Down
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ speakeasyVersion: 1.601.0
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:8165f715321cd34bcebb6c9bb0734a1791777229937787b8e13707d519b05a5e
sourceBlobDigest: sha256:b4f8d9a6b0f4245c50b5e53298343df470978417248fa3988aeeb84ec9200c93
sourceRevisionDigest: sha256:bc4f7484e81f4693e54f4c871624f2145dd733cf70efda21172fac9c189cb2af
sourceBlobDigest: sha256:d4d659ed65d585c988dcc3b9a169535b81da0ea9dfe3fd713cee128c5492b155
tags:
- latest
- speakeasy-sdk-regen-1754698272
- 1.1.45
- speakeasy-sdk-regen-1763165440
- 1.2.10
targets:
unstructured-python:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:8165f715321cd34bcebb6c9bb0734a1791777229937787b8e13707d519b05a5e
sourceBlobDigest: sha256:b4f8d9a6b0f4245c50b5e53298343df470978417248fa3988aeeb84ec9200c93
sourceRevisionDigest: sha256:bc4f7484e81f4693e54f4c871624f2145dd733cf70efda21172fac9c189cb2af
sourceBlobDigest: sha256:d4d659ed65d585c988dcc3b9a169535b81da0ea9dfe3fd713cee128c5492b155
codeSamplesNamespace: my-source-code-samples
codeSamplesRevisionDigest: sha256:a5e11972bfb15e43b7fcb2647b3a7b3e129e9303294f9110670280971b10780a
codeSamplesRevisionDigest: sha256:6ca89a508cad0cd0db461e5c79a783cfd24e2dd11758e036778af7e2621f4352
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
31 changes: 24 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,15 @@ Some of the endpoints in this SDK support retries. If you use the SDK without an
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
```python
from unstructured_client import UnstructuredClient
from unstructured_client.models import operations
from unstructured_client.utils import BackoffStrategy, RetryConfig


with UnstructuredClient() as uc_client:

res = uc_client.destinations.create_connection_check_destinations(request={
res = uc_client.destinations.create_connection_check_destinations(security=operations.CreateConnectionCheckDestinationsSecurity(
http_bearer="<YOUR_BEARER_TOKEN_HERE>",
), request={
"destination_id": "cb9e35c1-0b04-4d98-83fa-fa6241323f96",
},
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
Expand All @@ -138,14 +141,17 @@ with UnstructuredClient() as uc_client:
If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
```python
from unstructured_client import UnstructuredClient
from unstructured_client.models import operations
from unstructured_client.utils import BackoffStrategy, RetryConfig


with UnstructuredClient(
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
) as uc_client:

res = uc_client.destinations.create_connection_check_destinations(request={
res = uc_client.destinations.create_connection_check_destinations(security=operations.CreateConnectionCheckDestinationsSecurity(
http_bearer="<YOUR_BEARER_TOKEN_HERE>",
), request={
"destination_id": "cb9e35c1-0b04-4d98-83fa-fa6241323f96",
})

Expand Down Expand Up @@ -175,14 +181,16 @@ with UnstructuredClient(
### Example
```python
from unstructured_client import UnstructuredClient
from unstructured_client.models import errors
from unstructured_client.models import errors, operations


with UnstructuredClient() as uc_client:
res = None
try:

res = uc_client.destinations.create_connection_check_destinations(request={
res = uc_client.destinations.create_connection_check_destinations(security=operations.CreateConnectionCheckDestinationsSecurity(
http_bearer="<YOUR_BEARER_TOKEN_HERE>",
), request={
"destination_id": "cb9e35c1-0b04-4d98-83fa-fa6241323f96",
})

Expand Down Expand Up @@ -329,11 +337,14 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
```python
# Synchronous Example
from unstructured_client import UnstructuredClient
from unstructured_client.models import operations


with UnstructuredClient() as uc_client:

res = uc_client.destinations.create_connection_check_destinations(request={
res = uc_client.destinations.create_connection_check_destinations(security=operations.CreateConnectionCheckDestinationsSecurity(
http_bearer="<YOUR_BEARER_TOKEN_HERE>",
), request={
"destination_id": "cb9e35c1-0b04-4d98-83fa-fa6241323f96",
})

Expand All @@ -350,12 +361,15 @@ The same SDK client can also be used to make asynchronous requests by importing
# Asynchronous Example
import asyncio
from unstructured_client import UnstructuredClient
from unstructured_client.models import operations

async def main():

async with UnstructuredClient() as uc_client:

res = await uc_client.destinations.create_connection_check_destinations_async(request={
res = await uc_client.destinations.create_connection_check_destinations_async(security=operations.CreateConnectionCheckDestinationsSecurity(
http_bearer="<YOUR_BEARER_TOKEN_HERE>",
), request={
"destination_id": "cb9e35c1-0b04-4d98-83fa-fa6241323f96",
})

Expand Down Expand Up @@ -439,11 +453,14 @@ 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 operations


with UnstructuredClient() as uc_client:

res = uc_client.workflows.run_workflow(request={
res = uc_client.workflows.run_workflow(security=operations.RunWorkflowSecurity(
http_bearer="<YOUR_BEARER_TOKEN_HERE>",
), request={
"workflow_id": "e7054f23-ce92-4bf1-a1d7-7cf9cb14d013",
})

Expand Down
Loading