Observed since 21 Oct, 11:06 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
aikdna
Python Core and adapter for the KDNA protocol: independent container parsing, validation, LoadPlan, Runtime Capsule, and deterministic pack
This package contains two layers:
kdna.core — an independent Python implementation of the KDNA
protocol containers. It parses the ZIP envelope (mimetype STORED first,
CBOR payload.kdnab), validates kdna.json / payload / checksums against
the protocol JSON Schemas, computes the LoadPlan decision tree, emits the
Runtime Capsule with digest evidence, and packs authoring sources into
deterministic byte-identical containers. It has no dependency on the JS
toolchain.kdna.loader — the existing adapter that delegates inspect → LoadPlan → authorization → load → Runtime Capsule to @aikdna/kdna-cli for
applications that prefer the official JS runtime.from kdna.core import validate_file, plan_load_file, load_file, pack
result = validate_file("./writing.kdna") # five gates + overall_valid
plan = plan_load_file("./writing.kdna") # state / can_load_now / required_action
capsule = load_file("./writing.kdna", "compact") # Runtime Capsule
pack("./authoring-source", "./writing.kdna") # deterministic output
The Core is interoperable with the JS Core: a JS-packed container validates and loads identically in Python, a Python-packed container validates and loads identically in JS, and both packers produce byte-identical output for the same source (same SHA-256).
cd python-sdk
python -m pip install -e ".[dev]"
python -m pytest
This directory is not currently published as an official PyPI distribution. Use the npm CLI/Core packages for the published pre-release runtime. The Python Core is a source-level integration preview until a separate signed release pipeline exists.
The adapter layer supports @aikdna/kdna-cli >=0.35.0,<0.36.0 and checks the
CLI version before its first operation. Compatibility with a later pre-1.0 CLI
minor release must be verified before this range is widened. The adapter also
validates the declared inspect response boundary (format_version, asset_id,
version, and payload) instead of relying on the removed kdna_version
field.
from kdna import inspect_kdna, open_kdna
metadata = inspect_kdna("./writing.kdna")
capsule = open_kdna("./writing.kdna", mode="minimum")
assert capsule["type"] == "kdna.runtime-capsule"
Modes map to Core profiles:
minimum → compactall → fullauto → compactThe adapter fails closed when LoadPlan says can_load_now: false. Applications
that support licensed, account, organization, or remote assets must use the
corresponding authorization flow rather than bypassing it.
Set KDNA_CLI only when development or testing needs a non-global CLI command.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
cbor2Environment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | cbor2>=5.4 | runtime |
jsonschemaEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | jsonschema>=4.18 | runtime |
cryptographyEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | cryptography>=42 | runtime |
argon2-cffiEnvironment{
"extras": "",
"marker": "extra == \"argon2\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | argon2-cffi>=23; extra == "argon2" | runtime |
pytestEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pytest>=8; extra == "dev" | runtime |
blackEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | black>=24; extra == "dev" | runtime |
mypyEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | mypy>=1; extra == "dev" | runtime |
bdist_wheel · 32.5 KB · Python py3
sdist · 32.31 KB · Python source
Observed since 21 Oct, 11:06 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:f32fbb2f1b8913ae7a4e3d0b5ff9e1aca5520d71cd7cb965fabf2d74b5ecb0b4