DID Web + Verified History - Python
This repository includes Python libraries for working with did:webvh (did:web + Verified History) DID documents and the underlying log format. Methods are provided for provisioning and updating DID documents as well as a resolving existing did:webvh DIDs. Currently, version 0.4 of the specification is implemented.
Prerequisites
This library requires Python 3.10 or later. Dependencies are listed in pyproject.toml and can be installed via:
poetry install
Usage
A new did:webvh DID can be minted using the provision command. This will create a new Askar keystore for handling the signing key.
python3 -m did_webvh.provision --auto "domain.example"
This will output a new directory named after the new DID, containing did.jsonl (the DID log) and did.json (the current state of the document).
To automatically update the DID, edit did.json and execute the update command (use the identifier output from the provision command):
python3 -m did_webvh.update --auto "did:webvh:QmRwq46VkGuCEx4dyYxxexmig7Fwbqbm9AB73iKUAHjMZH:domain.example"
DID Resolution
The resolver script may be invoked via the command line, and supports dereferencing of fragments and paths:
python3 -m did_webvh.resolver "did:webvh:QmRwq46VkGuCEx4dyYxxexmig7Fwbqbm9AB73iKUAHjMZH:domain.example"
python3 -m did_webvh.resolver "did:webvh:QmRwq46VkGuCEx4dyYxxexmig7Fwbqbm9AB73iKUAHjMZH:domain.example#key-1"
python3 -m did_webvh.resolver "did:webvh:QmRwq46VkGuCEx4dyYxxexmig7Fwbqbm9AB73iKUAHjMZH:domain.example/whois.vp"
For testing, this script also accepts the path to the local DID history file:
python3 -m did_webvh.resolver -f did.jsonl "did:webvh:QmRwq46VkGuCEx4dyYxxexmig7Fwbqbm9AB73iKUAHjMZH:domain.example"
Demo
For demo purposes, a new DID can be minted along with a series of test updates applied using the included demo script:
python3 demo.py domain.example
Contributing
Pull requests are welcome! Please read our contributions guide and submit your PRs. We enforce developer certificate of origin (DCO) commit signing — guidance on this is available. We also welcome issues submitted about problems you encounter in using Trust DID Web - Python.
License
Metadata
Release files for did-webvh 1.0.1
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 |
|---|---|---|---|---|
| did_webvh-1.0.1.tar.gz | 40.0 kB | With provenance | Details for did_webvh-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| did_webvh-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for did_webvh-1.0.1-py3-none-any.whl |
Total release size: 91.5 kB
Release files / did_webvh-1.0.1.tar.gz
| Download URL | did_webvh-1.0.1.tar.gz |
|---|---|
| Size | 40.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fbf549c954d40e00d4b747596a322a82f71df5fbd75cee0985c2e33301df7eb6
|
|
BLAKE2b-256 checksum How to use checksums |
307c0318dbb77d6fe3325430f25c5d893c018219a2471491d06915f4e99d72d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 17, 2026.
Transparency logRelease files / did_webvh-1.0.1-py3-none-any.whl
| Download URL | did_webvh-1.0.1-py3-none-any.whl |
|---|---|
| Size | 51.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ccea967e9b4dfdec85eed938443f270e6d1c065c3dd1a65efdd629ca12d4da29
|
|
BLAKE2b-256 checksum How to use checksums |
ce98fd00e4aad3d481489ebf18aa3d581175b5ef6b151633ba9d7309d76d4309
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 17, 2026.
Transparency logSecurity for did-webvh 1.0.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for did_webvh-1.0.1.tar.gz
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 Jul 17, 2026.
Transparency logA 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.