Python SDK — uks-sdk
Pydantic models and a validator for UKS packets in Python. Same conformance behavior as the CLI and TypeScript SDK.
bash
pip install uks-sdkValidate
python
from uks_sdk import validate
result = validate(packet_dict)
if not result.valid:
for err in result.errors:
print(err)Typed models
The SDK exposes Pydantic models for packets and sources, so you get validation, autocompletion, and serialization for free.
python
from uks_sdk import Packet, Source
packet = Packet(
packet_id="uks-omega3-v1",
schema_version="3.0",
conformance_level="L1",
created_at="2026-06-15T00:00:00Z",
topic={"title": "Omega-3 Fatty Acids"},
sources=[
Source(
id="src_001",
title="EPA and DHA supplementation and cardiovascular risk",
source_type="meta_analysis",
credibility_score=9,
evidence_grade="high",
clinical_status="validated",
license_label="CC BY 4.0",
rights_url="https://creativecommons.org/licenses/by/4.0/",
)
],
)
packet.model_dump_json(indent=2)Interoperability
The Python validator, the TypeScript SDK, and the CLI agree on the shared conformance corpus — the "two independent interoperable implementations" the standard requires for IANA registration.
→ Related: TypeScript SDK · CLI · The Spec