Framework-free raw commerce contracts shared by Keble data providers and the raw API.
Project description
keble-data-infra-contract
Install the provider-neutral public contract with
pip install "keble-data-infra-contract>=0.1.0,<1".
Framework-free, provider-neutral raw-commerce contracts. This distribution owns validated request/response models, provider protocols, operation keys, manifests, and typed domain errors. It intentionally has no FastAPI, database, HTTP client, provider, platform, or idea dependency.
The distribution declares only registry-resolvable runtime dependencies. Do not
add workspace-relative tool.uv.sources here: downstream Git/subdirectory installs
must build this contract without inheriting paths outside the repository checkout.
Provider packages own implementations and native DTOs. The raw API consumes provider manifests and constructs HTTP paths from their typed operation keys.
uv run --package keble-data-infra-contract pytest -q keble-data-infra-contract/tests
uv run --package keble-data-infra-contract npx --yes pyright keble-data-infra-contract
uv build --package keble-data-infra-contract
Contract values inherit ContractModel, which accepts snake-case Python names
and camel-case wire aliases, rejects undeclared fields, and is frozen. Persisted
Mongo shapes do not belong here; provider/API packages own SchemaBase /
MongoObjectBase aggregates when durability is required.
ContractModel and the deliberately producer-tolerant Job/Result projection
both configure Pydantic through keble-helpers.PydanticModelConfig; a local
ConfigDict convention would split alias and validation ownership again.
Money, Currency, and AmazonMarketplace are imported from
keble-helpers. Provider-native response details remain inside the provider
package instead of crossing this boundary through an untyped extension bag.
Video enrichment uses the same framework-free boundary: immutable asset,
submission, job, completion-event, result, and normalized-projection models plus
one VideoEnrichmentGateway Protocol. HTTP submission and Mongo correlation
remain implementations owned by keble-data-infra-api.
Authorized provider transcripts use one canonical VideoTranscript/
VideoTranscriptSegment shape across submission, authoritative result reads, and
the local projection. Reuse evidence binds the normalized transcript checksum to
the data-infra source reference and media SHA-256; a title/description such as
ShortVideo.caption is not a spoken transcript and cannot bypass ASR.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keble_data_infra_contract-0.1.0.tar.gz.
File metadata
- Download URL: keble_data_infra_contract-0.1.0.tar.gz
- Upload date:
- Size: 36.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d67b65cfef9a3a98ded68adfea399aa70b2b73dc3b953f929dc2f5c0b3103f6
|
|
| MD5 |
0126de1989ecccf3666ecc2aec0ed8c3
|
|
| BLAKE2b-256 |
1c4c21b85501b8cf4755c71c7104b6da13c9ed5554b2742494a883356f0cbe98
|
File details
Details for the file keble_data_infra_contract-0.1.0-py3-none-any.whl.
File metadata
- Download URL: keble_data_infra_contract-0.1.0-py3-none-any.whl
- Upload date:
- Size: 39.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
727f2f49f4d84a8a51ea5280556d5fc859003477cf7631fb284296a08252fc6a
|
|
| MD5 |
785c083e383b5ecc1fc18e17a26f761f
|
|
| BLAKE2b-256 |
3ebc7083d8015403cd4292fc085ef6af2e4a6c66cb50112c64a7162b1fa0470f
|