Skip to main content

inh-contracts

Shared contracts package consumed by both the ingestion service (inh-ingestion-svc) and the public API service (inh-public-api-svc).

This is the single source of truth for:

  • Weaviate naming (inh_contracts.naming) — get_workspace_collection_name and get_user_tenant_name. Both services derive collection/tenant names from raw workspace/user ids and MUST agree byte-for-byte (#12).
  • Versioned event schemas (inh_contracts.events) — DocumentUploadMessage and DocumentCompletionMessage, the canonical cross-service event contracts carrying contract_version (#17).
  • Embedding provider abstraction (inh_contracts.embedding, #311) — the EmbeddingProvider interface, the TEIProvider (default) and OpenAICompatibleProvider wire adapters, create_embedding_provider(), the shared retry/batching helpers, and the Weaviate collection model-identity guard (inh_contracts.embedding.identity). Both services' embedder.py are thin wrappers over this — see docs/reference/configuration.md's "Embedding provider & model-identity guard" section for the operator-facing picture.

CONTRACT_VERSION pins the semantic version of these contracts.

Usage

Each service declares a uv path dependency in its pyproject.toml:

[project]
dependencies = ["inh-contracts", ...]

[tool.uv.sources]
inh-contracts = { path = "../inh-contracts" }

and imports from it:

from inh_contracts.naming import get_workspace_collection_name, get_user_tenant_name
from inh_contracts.events import DocumentUploadMessage, DocumentCompletionMessage

Metadata

Release files for inh-contracts 2.3.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 inh-contracts 2.3.1
File Size Uploaded
inh_contracts-2.3.1.tar.gz 114.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for inh-contracts 2.3.1
File Interpreter ABI Platform
inh_contracts-2.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 162.0 kB

Release files / inh_contracts-2.3.1.tar.gz

Download URL inh_contracts-2.3.1.tar.gz
Size 114.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3cf55520b3f4d92c976fd978a74612523af272f924078feb9585ee46e9960119
BLAKE2b-256 checksum
How to use checksums
01a5b72d2c74c3debcbb007a8cb1a82dc7caa51d86d4033cb8fe691d62cd56d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 3, 2026.

Transparency log

Release files / inh_contracts-2.3.1-py3-none-any.whl

Download URL inh_contracts-2.3.1-py3-none-any.whl
Size 47.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
593c5bda296eb36e8bdcb9fabde797d9adc628c96dd0ed5a03adf493d9e1f487
BLAKE2b-256 checksum
How to use checksums
b9526293006e8b8cf1fce6902be0757191ddd616141c06246fb067a680a9b1c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.3.1 This release

2 release files

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