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.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 qaechi-contracts 1.0.0
File Size Uploaded Provenance Actions
qaechi_contracts-1.0.0.tar.gz 14.4 kB With provenance Details for qaechi_contracts-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 29.7 kB

Release files / qaechi_contracts-1.0.0.tar.gz

Download URL qaechi_contracts-1.0.0.tar.gz
Size 14.4 kB
Tags Source
SHA-256 checksum
How to use checksums
25f29c521a0eb03cb3e23d267581fc1a14f593edb735007de8e0fcdf1e7b1570
BLAKE2b-256 checksum
How to use checksums
5dfe933600fdd81a402e5b2e16f7839320bb6b26279564aafe2c194431084535
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.0-py3-none-any.whl

Download URL qaechi_contracts-1.0.0-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
479c4df0c9c35df8704b3cc940b78dc7d18badbac017ebc0f8d9cadc16cc1ee7
BLAKE2b-256 checksum
How to use checksums
a6e00ef864e16dae7ce24055ca4338653f802d603fb8025d76338f7b02dcb1ae
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.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

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

Select from 2 files

Attestation for qaechi_contracts-1.0.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 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.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