Skip to main content

qaechi-contracts

The messages and API shapes every qaechi module speaks: Python models and JSON Schemas. Build a producer, a consumer or a client in any language against these and it works with any qaechi release of the same major version.

한국어 | How the modules fit together

pip install qaechi-contracts
from qaechi.contracts import JobMessage, JobRequest, ResultEvent, Topics

msg = JobMessage(job_id="4f6c2a0e-...", request=JobRequest(
    document_id="inv-2026-0042", source="invoices/0042.pdf", doc_type="invoice"))
producer.produce(Topics.JOBS, key=msg.request.document_id, value=msg.to_json())

event = ResultEvent.model_validate_json(record.value())   # from Topics.RESULTS

What is in it

Message Where it travels Schema
JobRequest Body of POST /jobs job-request
JobMessage Kafka qaechi.parse.jobs, key documentId. Any system may publish one, for example a transactional outbox job-message
ResultEvent Kafka qaechi.parse.results, key documentId. One per finished job result-event
Extraction GET /results/{id}: values with quote and page extraction

Headers: traceparent (W3C trace context) on every message, qaechi-error on DLQ copies. Default topics are in Topics; every module lets you rename them.

Compatibility rules

  • Every message carries specVersion. This is version 1.
  • Within a major version fields are only added, and only as optional. Readers ignore fields they do not know, so an older consumer keeps working with a newer producer.
  • A breaking change means specVersion: "2", a new major release of this package, and a period in which qaechi modules read both.
  • The major version of qaechi-contracts is the compatibility line. Servers and clients that share it can be upgraded independently.

CI checks every change two ways: the committed JSON Schemas must match the models, and the latest released qaechi-parser must produce messages that validate against them.

Other languages

The JSON Schemas (draft 2020-12) are the source for other languages. Generate types with your usual tool, for example quicktype or datamodel-code-generator. Java (io.github.qaechi:qaechi-contracts) and TypeScript (@qaechi/contracts) packages are planned.

License

Apache-2.0. See LICENSE.

Metadata

Release files for qaechi-contracts 1.0.1

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

Source distribution (sdist)

Source distribution for qaechi-contracts 1.0.1
File Size Uploaded Provenance Actions
qaechi_contracts-1.0.1.tar.gz 14.5 kB With provenance Details for qaechi_contracts-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qaechi-contracts 1.0.1
File Interpreter ABI Platform Actions
qaechi_contracts-1.0.1-py3-none-any.whl Python 3 none any Details for qaechi_contracts-1.0.1-py3-none-any.whl

Total release size: 29.7 kB

Release files / qaechi_contracts-1.0.1.tar.gz

Download URL qaechi_contracts-1.0.1.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f61e50d494721111494da1e36e852bb74cee02fe486370633fe8e2b87d19648b
BLAKE2b-256 checksum
How to use checksums
070bb9a78c698f51d89706aaf308269bb78d0732b782f933713b9e2066a35f4e
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 Nov 30, 2026.

Transparency log

Release files / qaechi_contracts-1.0.1-py3-none-any.whl

Download URL qaechi_contracts-1.0.1-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b696b2ccde297f6f5db186e27edebfcaf6fc1b40769ad5129bad5efa9cc214d7
BLAKE2b-256 checksum
How to use checksums
e41e519d16f006f82c6aa4d12c873ce8b5e1a21c2964100ac174b1cf6b85f4d4
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 Nov 30, 2026.

Transparency log

Security for qaechi-contracts 1.0.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for qaechi_contracts-1.0.1.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 Nov 30, 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

1.0.1 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