
A Python client for the Unstructured Platform API
Repo Unstructured-IO/unstructured-python-client, read from GitHub 7 h ago. Unstructured-IO has not joined Take My Repo.
retryable, error_type, error_reason and audience. Errors the API raises deliberately publish these fields next to detail, eg a 503 OCR timeout with "retryable": false. Callers no longer need to parse err.body to read them. Each attribute is None when the body is not JSON, the field is absent, or its value has the wrong type. The retry loop reads retryable with the same parser.skip_preflight to CreateWorkflow and UpdateWorkflow. Set it to True to skip the job preflight check for a workflow's jobs; on update, leaving it unset keeps the current value. WorkflowInformation.skip_preflight reports the workflow's current setting. For a one-off job, set "skip_preflight": true in the request_data JSON passed to jobs.create_job.JobStatus and JobProcessingStatus gain REJECTED; previously jobs.get_job raised on a rejected job, and one rejected job failed the whole jobs.list_jobs page. JobInformation.status and JobDetails.processing_status now also accept a status this SDK version does not know, returning it as a plain str instead of raising. Known statuses are still returned as enum members, but the fields are typed Union[JobStatus, str] and Union[JobProcessingStatus, str], so type-checked code that reads .value or .name from them needs to handle the str case.JobNodeDetails gains failure_category (a PreflightFailureCategory, or a plain str for a category this SDK version does not know) and failure_reason, set on the node that failed preflight in jobs.get_job_details. Previously both were dropped during deserialization.certifi to 2026.10.19, which removes the emSign ECC Root CA - G3 root after eight eMudhra intermediate CA private keys were compromised. requests and httpx trust certifi's bundle and do not check revocation, so with the older bundle they accepted certificates chaining to that root. certifi is now also a direct dependency at >=2026.10.19, so pip installs pick up the new bundle too.UNSTRUCTURED_CLIENT_TCP_KEEPALIVE_IDLE (60 seconds), UNSTRUCTURED_CLIENT_TCP_KEEPALIVE_INTERVAL (30 seconds), and UNSTRUCTURED_CLIENT_TCP_KEEPALIVE_COUNT (5); set UNSTRUCTURED_CLIENT_TCP_KEEPALIVE=0 or false to disable. Caller-supplied clients are unchanged.Full Changelog: v0.46.4...v0.47.0
Full Changelog: v0.46.2...v0.46.4
Accept the API URL the Transform Platform hands you as server_url. The app's API Keys page and the docs give you https://platform-api.transform.unstructured.io/api/v1, which works with curl but 404'd every Platform call in the SDK: the URL cleaner only stripped a path for unstructuredapp.io hosts, so the /api/v1 survived and the operation's own /api/v1/jobs/ was appended on top, producing /api/v1/api/v1/jobs/. Hosts under unstructured.io are now recognized too, and are matched on domain boundaries so a lookalike host like unstructuredapp.io.example.com keeps its path and scheme. A server_url passed to an individual operation is cleaned as well — previously only the client-level URL was, so client.jobs.list_jobs(request={}, server_url=...) still 404'd.
Full Changelog: v0.46.0...v0.46.1
Full Changelog: v0.45.0...v0.46.0
httpx.AsyncClient connection-pool limits configurable via env vars: UNSTRUCTURED_CLIENT_MAX_CONNECTIONS (default 100), UNSTRUCTURED_CLIENT_MAX_KEEPALIVE_CONNECTIONS (default 20), and UNSTRUCTURED_CLIENT_KEEPALIVE_EXPIRY (default 5.0s). Defaults match httpx, so behavior is unchanged unless set. Useful when deploying behind a connect-time-only load balancer (e.g. Kubernetes ClusterIP without a mesh) where shorter keepalives force connections to redistribute across backend pods.SSL_CERT_FILE / REQUESTS_CA_BUNDLE env vars to point the split-PDF httpx.AsyncClient at a custom trust store, so a single env-var setting applies uniformly across Python tooling.UNSTRUCTURED_CLIENT_TLS_CLIENT_CERT and UNSTRUCTURED_CLIENT_TLS_CLIENT_KEY env vars to wire an mTLS client certificate into the split-PDF httpx.AsyncClient (single PEM, or split cert + key files).event=plan_created log to include the resolved pool limits and trust-store / mTLS mode so the active config is visible in production logs.