AXON document format — typed, deterministic, signable document archives. Powers tdoc (tdoc.xyz).
Project description
AXON — Document Format · powers tdoc (https://tdoc.xyz)
Deterministic, semantic, signable document archives. A clean break from PDF / DOCX / HTML.
- Spec:
AXON_Format_Specification.txt— v1.0 design draft. - Reference impl:
axon.py— single-file Python reference (~1800 lines). - Demo:
demo.py— runs the full pipeline end-to-end. - Product (commercial API on top):
product/— seeproduct/README.md.
The AXON format vs the .tdoc file extension
- AXON is the open format. Open spec, Apache-2.0 reference implementation. Anyone can build tools on it.
.tdocis the standard file extension for AXON archives. A.tdocfile is an AXON archive.- Readers that support AXON also accept
.axonfor backwards compatibility.
Think of it like .png vs PNG: one is the file extension users see, the other is the open standard.
Status
Early-alpha reference. Spec is complete; implementation covers most of it and ships with 50 passing tests (32 format + 18 API) covering the load-bearing invariants. Landing is live at https://tdoc.xyz with Mozilla Observatory A+ · 125/125 · 10/10 tests.
Install
From PyPI (once published):
pip install axon-document # → import axon
pip install axon-document[crypto] # + Ed25519 signatures
pip install axon-document[pdf] # + PyMuPDF PDF ingest
pip install axon-document[all] # everything
From source (editable):
python3 -m venv .venv
.venv/bin/pip install -e ".[dev,crypto]"
.venv/bin/pytest tests/ product/tests/
Optional extras: [pdf], [fastjson], [crypto], [mathml], [all].
Quick start
from axon import convert_axc_string, encode_archive, decode_archive, render_html
doc = convert_axc_string("""
@section [id="hello"]:
@heading [level=1]:
Hello
@paragraph:
A deterministic document.
""", title="Hello", document_type="article.research")
encode_archive(doc, "hello.tdoc") # .tdoc extension is the convention
loaded = decode_archive("hello.tdoc", verify=True)
print(render_html(loaded))
What's verified
As of the current test suite (pytest tests/):
| Invariant | Status |
|---|---|
| AXC parse ↔ serialise round-trip (Unicode, nested, attributes) | ✅ |
| Archive byte-determinism — two encodes produce identical bytes | ✅ |
| ZIP entries stamped with fixed epoch (not wall-clock) | ✅ |
encode_archive does not mutate manifest.modified |
✅ |
Content-hash tamper detection via validate() |
✅ |
verify_document rejects zeroed manifest hash |
✅ |
| Ed25519 cryptographic signing + verification | ✅ |
| ZIP-bomb + path-traversal defenses on decode | ✅ |
| Spec conformance (accessibility warnings, dup-ids, hash mismatch) | ✅ |
32 tests, 0 xfail for the format. 18 additional tests for the tdoc API service (auth, quotas, security headers, rate limits). 50 total, all green.
License
Apache-2.0. See LICENSE.
Commercial
Hosted API, paid plans, and signing-as-a-service live at tdoc.xyz.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file axon_document-0.1.0.tar.gz.
File metadata
- Download URL: axon_document-0.1.0.tar.gz
- Upload date:
- Size: 31.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff09f0f0fb17950bf8c3323bc9391c59756d996f5a7ebf795533a74d09e2f9ce
|
|
| MD5 |
af0da9d87e5e3216140ee30a81ae9f79
|
|
| BLAKE2b-256 |
e67a9a7b385c22c0cd5f35f54d403d0b39317a34b890256f7e518165d740453d
|
Provenance
The following attestation bundles were made for axon_document-0.1.0.tar.gz:
Publisher:
publish-pypi.yml on LuciferMors/tdoc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
axon_document-0.1.0.tar.gz -
Subject digest:
ff09f0f0fb17950bf8c3323bc9391c59756d996f5a7ebf795533a74d09e2f9ce - Sigstore transparency entry: 1370517151
- Sigstore integration time:
-
Permalink:
LuciferMors/tdoc@e714e06c6c74d5b2f8d86f3578938d2465caaff7 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/LuciferMors
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@e714e06c6c74d5b2f8d86f3578938d2465caaff7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file axon_document-0.1.0-py3-none-any.whl.
File metadata
- Download URL: axon_document-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccaee689efc0f4fbd1c8f1f200ec6223f845b772d4062cec19ac3946c7fd716c
|
|
| MD5 |
a455fa77556e458d8b3c5d8cde6a0380
|
|
| BLAKE2b-256 |
97250191ced0cc83a830658d152787e8db5926e886f24e3cd47842ae0e3db1fa
|
Provenance
The following attestation bundles were made for axon_document-0.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on LuciferMors/tdoc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
axon_document-0.1.0-py3-none-any.whl -
Subject digest:
ccaee689efc0f4fbd1c8f1f200ec6223f845b772d4062cec19ac3946c7fd716c - Sigstore transparency entry: 1370517248
- Sigstore integration time:
-
Permalink:
LuciferMors/tdoc@e714e06c6c74d5b2f8d86f3578938d2465caaff7 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/LuciferMors
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@e714e06c6c74d5b2f8d86f3578938d2465caaff7 -
Trigger Event:
push
-
Statement type: