Skip to main content

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/ — see product/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.
  • .tdoc is the standard file extension for AXON archives. A .tdoc file is an AXON archive.
  • Readers that support AXON also accept .axon for 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.

Metadata

Release files for axon-document 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for axon-document 0.1.0
File Size Uploaded
axon_document-0.1.0.tar.gz 31.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for axon-document 0.1.0
File Interpreter ABI Platform
axon_document-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 55.3 kB

Release files / axon_document-0.1.0.tar.gz

Download URL axon_document-0.1.0.tar.gz
Size 31.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ff09f0f0fb17950bf8c3323bc9391c59756d996f5a7ebf795533a74d09e2f9ce
BLAKE2b-256 checksum
How to use checksums
e67a9a7b385c22c0cd5f35f54d403d0b39317a34b890256f7e518165d740453d
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 Apr 24, 2026.

Transparency log

Release files / axon_document-0.1.0-py3-none-any.whl

Download URL axon_document-0.1.0-py3-none-any.whl
Size 23.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ccaee689efc0f4fbd1c8f1f200ec6223f845b772d4062cec19ac3946c7fd716c
BLAKE2b-256 checksum
How to use checksums
97250191ced0cc83a830658d152787e8db5926e886f24e3cd47842ae0e3db1fa
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 Apr 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page