unidpp-py
The UniDPP Python library — the semantics mirror and conformance tooling. Part of UniDPP (github.com/unidpp). License: MIT.
Pure stdlib (no runtime dependencies). The package mirrors the Rust/TypeScript core so the semantics have a second, independent statement:
unidpp.model— the mirrored model (documents, findings, verdicts);unidpp.eventlog— the commitment-chained event log;unidpp.verify— the verification-pipeline harness (the I13 degradation ladder + I9 verdicts; stdlibhmac/hashlibreplace WebCrypto, ECDSA is a deliberate unsupported-slot placeholder per the multi-suite degrade model);unidpp.canonical— canonical JSON (RFC 8785-lite);unidpp.adapters— protocol adapters:untp(UNTP verifiable credentials),en18223(the EN 18223 document validator + EU-profile runner),epcis;unidpp.temporal— the DPP temporal profile;unidpp.carrier— QR carrier-budget conformance;unidpp.conformance— the conformance runner.
Conformance
The conformance runner proves the validators catch real defects, not
synthetic strawmen. CHECK_REGISTRY carries the check classes:
| check | what it proves |
|---|---|
positive-corpus |
the ported TS fixtures (laptop, car) validate against the wire schemas and their chains verify |
audit-negative |
the AUDIT A1–A6 corpus defects (found in EN 18223's own examples) fail with precise findings |
temporal-conformance |
every timestamp field conforms to the DPP temporal profile (ISO 8601-1:2019 incl. Amd 1:2022 disambiguation) |
carrier-budget |
serialized payload sizes fit their declared carrier class (ISO/IEC 18004 QR capacity tables, ported from the CLI) |
python -m unidpp.conformance --out reports/
The temporal profile (unidpp.temporal) validates every
timestamp field with a distinct finding code — separator typography
(T1, the en-dash the EN's own Annex B prints), extended-format and
precision rules, calendar ranges, the 24:00:00 end-of-day form,
timezone discipline, and the decimal sign:
>>> from unidpp.temporal import validate_timestamp
>>> validate_timestamp("2025–08–22T03:12:00Z", "lastUpdated").code
'T1-separator-typography'
>>> validate_timestamp("2025-08-22T03:12:00Z", "lastUpdated") is None
True
The carrier budget (unidpp.carrier) measures the canonical
serialized size of a payload against the ported ISO/IEC 18004 QR
byte-capacity tables; a payload that exceeds its declared class is
flagged with the computed size versus the capacity — never silently
truncated:
>>> from unidpp.carrier import measure
>>> m = measure({"a": "x" * 380}, declared="qr-v15-M")
>>> (m.size_bytes, m.fits_declared)
(388, True)
Two report suites build on the runner (scripts/):
- EU profile (
eu_profile_report.py) — the full EN 18223:2026 example corpus through the validators. The corpus itself is an extraction from licensed sources and is deliberately not distributed with the repository (gitignored); the suite runs where the corpus is present and its findings are published asconformance/eu-profile/REPORT.md. - Competitor register (
competitor_report.py) — the published artifacts of the open-source DPP implementations (freeDPP live endpoints, open-dpp's e2e fixture) through the same pipeline, with verbatim source citations; findings inconformance/competitors/REPORT.md.
Build & test
pip install -e ".[test]"
pytest
The suite covers the model, event log, verification ladder, adapters (UNTP round-trip, EN 18223 projection), the conformance checks (temporal, carrier, corpus), and the competitor register. The EU-profile corpus tests skip automatically when the licensed extraction is not present.
Releasing
Releases are version tags: a pushed v* tag runs .github/workflows/publish.yml,
which builds the sdist and wheel and uploads them to PyPI through PyPI trusted
publishing. Trusted publishing needs a one-time link on pypi.org: under the
project's publishing settings, add this repository and the publish workflow
as a trusted publisher. The first publication of 0.1.0 was made by the owner
from a maintainer machine, before trusted publishing was linked.
Metadata
Release files for unidpp 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| unidpp-0.1.2.tar.gz | 106.0 kB | Without provenance | Details for unidpp-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| unidpp-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for unidpp-0.1.2-py3-none-any.whl |
Total release size: 194.3 kB
Release files / unidpp-0.1.2.tar.gz
| Download URL | unidpp-0.1.2.tar.gz |
|---|---|
| Size | 106.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
504706e788b8b45d315a8f227964e8bfe3c58819d58fd46ef705620e70c439e3
|
|
BLAKE2b-256 checksum How to use checksums |
d9fe9e9e6b216105fe88f4bf4900edbd1b807817d4ca47bebcfc6bb37c3f7b3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.5
|
Release files / unidpp-0.1.2-py3-none-any.whl
| Download URL | unidpp-0.1.2-py3-none-any.whl |
|---|---|
| Size | 88.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a9eab01369aa3fa7ee895621c003a2740b3030d16afaf2ade5d0ac07309be77
|
|
BLAKE2b-256 checksum How to use checksums |
f726bb772ed393623525b1df3cef8c0ea76e12dc319286d0a7df19b52e683b30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.5
|
Security for unidpp 0.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.