This release is a pre-release and may not be stable for production use.
CERVEL Public Python SDK — Experimental
This directory contains a deliberately small Python convenience layer for the public CERVEL 0.1-draft interoperability contracts.
The SDK mirrors the fields already published in the repository's example JSON Schemas. The schemas remain authoritative for the public drafts; these Python classes and validation helpers are convenience representations only.
Scope
Included models:
KnowledgeReferenceCaptureEnvelopeLookupRequestLookupResultandLookupResultItemErrorEnvelopeCapabilityDiscoveryandCapabilityContract
Each model exposes to_dict() for JSON-compatible serialization.
The prepared 0.1.0a1 candidate also includes optional, purely local contract-validation helpers:
validate_payload(contract, value)validate_capture_envelope()validate_lookup_request()validate_knowledge_reference()validate_lookup_result()validate_error_envelope()validate_capability_discovery()validation_errors()get_public_schema()
The base SDK remains dependency-free. Once 0.1.0a1 is explicitly published, validation will be installed with the optional extra:
python -m pip install 'cervel-public[validation]==0.1.0a1'
Until then, the published PyPI release remains 0.1.0a0 and does not contain these helpers.
The validation extra uses the same public JSON Schema engine used by repository conformance. Validation is local only; it performs no network requests.
Deliberate boundary
This SDK does not provide a CERVEL network client and does not implement authentication, authorization, capture processing, retrieval, ranking, knowledge compilation, provenance, persistence, synchronization, cryptography, model routing, agent behavior, storage, service topology, or any private CERVEL runtime mechanism.
It does not establish compatibility with a production CERVEL implementation. Compatibility claims are limited to the explicitly published experimental draft contracts and their conformance fixtures.
Example
from cervel_public import (
KnowledgeReference,
LookupResult,
LookupResultItem,
validate_lookup_result,
)
reference = KnowledgeReference(id="example-knowledge-1")
result = LookupResult(items=(LookupResultItem(reference=reference, text="Example"),))
payload = result.to_dict()
validate_lookup_result(payload)
The resulting payload is validated against the published Lookup Result schema, including its $ref to the public Knowledge Reference schema.
Development and packaging verification
From the repository root, install the pinned validation and build dependencies:
python -m pip install -r conformance/requirements.txt -r sdk/python/requirements-build.txt
Then run the source contract checks and build both distribution formats:
python conformance/validator.py
python sdk/python/tests/test_conformance.py
python sdk/python/tests/test_validation.py
python -m build --no-isolation --sdist --wheel --outdir sdk/python/dist sdk/python
python sdk/python/tests/test_distribution.py
CI additionally installs the built base wheel into a fresh virtual environment with --no-index --no-deps and smoke-tests it from outside the repository source tree. This proves that the base artifact remains importable without the optional validation dependency and without accidentally resolving cervel_public from the checkout.
The base package declares no runtime dependencies. The validation extra directly pins jsonschema==4.25.1; its transitive dependencies are resolved by pip. Build tooling is directly pinned, but this experimental rollout does not claim a fully hash-locked or hermetic transitive Python dependency graph.
No package publication, artifact upload, external CERVEL service access, or production compatibility claim is performed by these checks.
Metadata
Release files for cervel-public 0.1.0a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cervel_public-0.1.0a2.tar.gz | 12.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cervel_public-0.1.0a2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.7 kB
Release files / cervel_public-0.1.0a2.tar.gz
| Download URL | cervel_public-0.1.0a2.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1d054ed323dd0844fe765c61112cba9c0c2b666af0a624c7a0f1f54421ade68
|
|
BLAKE2b-256 checksum How to use checksums |
e7856b137246eb6a2a271f923402feccdfc3d23cbad1540c46817d3cde3bcecf
|
| 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 Sep 11, 2026.
Transparency logRelease files / cervel_public-0.1.0a2-py3-none-any.whl
| Download URL | cervel_public-0.1.0a2-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8728525d9628659890e2fa51b5af3c9d5a6cf49de0ad78e4d0f06548a75d0ac3
|
|
BLAKE2b-256 checksum How to use checksums |
9159ac55ee7f50353bbef1779f192cb2449030e6ba32acee8ced12cdd92092c8
|
| 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 Sep 11, 2026.
Transparency log