Skip to main content

ParseDock Python SDK

Two layers:

  1. Hand-written lifecycle wrapper — parsedock_sdk (no dependencies, stdlib only). Encodes retries, backoff, polling, result_version handling, SSE and the "ack only after your sink succeeded" rule.
  2. Generated client — ../python-generated/ produced from api/openapi.yaml by OpenAPI Generator (make sdk). Use it for typed models of every IR field; regenerate after any spec change instead of editing it.
from parsedock_sdk import ParseDockClient

with ParseDockClient("http://localhost:8080", token="…") as c:
    job = c.create_job("invoice.pdf", mode="accurate", idempotency_key="invoice-42")
    final = c.wait(job["job_id"])                  # queued → running → completed
    if final["status"] != "completed":
        raise SystemExit(final.get("error_code"))

    ir, version = c.download(job["job_id"], fmt="json")

    # Release only after the real consumer accepted the bytes:
    c.download_and_ack(job["job_id"], fmt="markdown",
                       sink=lambda b: open("out.md", "wb").write(b))

    c.wait_released(job["job_id"])                 # released / expired

Why download_and_ack is not automatic in download: an HTTP 200 means the bytes left the server, not that you stored them. If your sink raises, the exception propagates and the result stays available for a retry until its TTL.

Errors are ParseDockError(status, code, message) with retryable telling you whether a retry can help (429/5xx, coordinator_unavailable).

Tested in Phase 0

sdk/python/test_sdk.py runs the lifecycle against a live stack (create → wait → download → ack → 410 → released) and asserts that a failing sink does not release the result. Run it with make sdk-test.

Metadata

Release files for parsedock 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for parsedock 0.1.0
File Size Uploaded Provenance Actions
parsedock-0.1.0.tar.gz 8.7 kB With provenance Details for parsedock-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for parsedock 0.1.0
File Interpreter ABI Platform Actions
parsedock-0.1.0-py3-none-any.whl Python 3 none any Details for parsedock-0.1.0-py3-none-any.whl

Total release size: 18.3 kB

Release files / parsedock-0.1.0.tar.gz

Download URL parsedock-0.1.0.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1fba05897051a6a1d319792dd0be22d694353b56b15e09f3f49c5b549df33fbb
BLAKE2b-256 checksum
How to use checksums
e2235c7d71a0273a6f14b3df279f794cc33e438896a22e3a7317cc3a47a3904d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / parsedock-0.1.0-py3-none-any.whl

Download URL parsedock-0.1.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23042321fb3e37d5277cde7ff54881dfecb3e99001ec80035bac8398c73607f7
BLAKE2b-256 checksum
How to use checksums
92a63caefbb2ef7b2a71a677d9f632a54131a751699bd45c43509a7d22d30389
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for parsedock 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for parsedock-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page