Skip to main content

TDL

TDL, the Tesserae Data Language, is a small structure-only language for the files the Tesserae Shell reads: blocks, properties and values. tdl is the Python library that reads it into a tree that keeps everything in the file (comments, layout, positions), reports every mistake with file:line:column, and writes the text back unchanged except for an edit you ask for.

Status: alpha, package 0.1.0 (not yet published), language version 0.1. The API may change before 1.0 (a minor version may break it; see docs/versioning.md). The language is in docs/language.md, the API in docs/api.md, the reasons for the choices in docs/decisions.md.

tdl needs Python 3.14 or later and has no dependencies:

pip install tesserae-dl
import tdl

text = """\
---
TDL: 0.1
Name: Shell_Root
---
Shell {
  Bar { Name: Top_Bar, Height: 32 }   # pixels
}
"""

doc = tdl.loads(text, path="Main_Shell.tdl")  # raises TDLSyntaxError on the first mistake
doc.root.type  # 'Shell'
doc.find("Shell_Root.Top_Bar").name  # 'Top_Bar'
assert tdl.dumps(doc) == text  # the exact text back, byte for byte

broken = text.replace("Height: 32", "Height 32")
result = tdl.parse(broken)  # never raises for a syntax error
[str(e) for e in result.errors]  # every error, in source order, up to 50

doc2 = doc.with_metadata("UID", "0192d3c4")  # one edit: every other byte is unchanged
doc3 = doc.find("Shell_Root.Top_Bar").with_property("Height", "40")
  • loads, load (a binary file object), parse, dumps, dump.
  • A tree of Document, Metadata, Block, Property, If, For and Comment, with Word, String, Number, Percent, Call, List, Slot and Template for values. Nodes are immutable, keep where they came from (node.origin), and are safe to share between threads.
  • Edits return a new Document and change only the bytes they name: with_metadata, without_metadata, Block.with_property, replace. An edit that would break the file raises.
  • 22 error codes, each with a plain message, a hint and a position (tdl-bare-hash: "This colour needs quotes. Quote the colour: "#ffffff""). The list is in docs/language.md.
  • Limits (tdl.Limits): 1 MiB of text, 50 errors, 64 levels of nesting.
  • Not in 0.1: checking keys or types (that is the program's, such as the shell), building a tree in code and formatting it, to_data(), a command line. See docs/api.md.

A 100 KB file reads in about 13 ms and a file at the 1 MiB limit in about 140 ms (docs/benchmarks.md).

PyPI name: tesserae-dl. Import name: tdl.

The conformance corpus

tests/corpus/ holds the files and expected results that define the language: valid files with their normalised content, files with each error and its position, and edits with their result. It ships in the source distribution (not in the wheel) as test data, and the Tesserae Shell reads it. New cases come from a TDL-REQ-### through the maintainer; see .agents/skills/conformance-corpus/SKILL.md.

Development

uv pip install -e . --group dev   # into the active venv (Python 3.14+)
python tools/check.py             # ruff, format check, mypy (strict), pytest: what CI runs
python benchmarks/bench.py        # timing against the budget (docs/benchmarks.md)

Work is tracked on the Tesserae Data Language board (python tools/board.py status). Agent instructions are in AGENTS.md; project skills are in .agents/skills/.

Versioning

See docs/versioning.md.

Licence

MIT

Metadata

Release files for tesserae-dl 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 tesserae-dl 0.1.0
File Size Uploaded Provenance Actions
tesserae_dl-0.1.0.tar.gz 61.5 kB With provenance Details for tesserae_dl-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tesserae-dl 0.1.0
File Interpreter ABI Platform Actions
tesserae_dl-0.1.0-py3-none-any.whl Python 3 none any Details for tesserae_dl-0.1.0-py3-none-any.whl

Total release size: 84.1 kB

Release files / tesserae_dl-0.1.0.tar.gz

Download URL tesserae_dl-0.1.0.tar.gz
Size 61.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a0b57d0180788bc2e378321236ec5c94e19b68dcf214f7cf1f83ec33f479af9b
BLAKE2b-256 checksum
How to use checksums
7d427f569a03810a02383c1e4bf6b7971f13fef7b3a854f440aee0894c852c6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 3, 2026.

Transparency log

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

Download URL tesserae_dl-0.1.0-py3-none-any.whl
Size 22.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6086dd27ae3ac5e698dbec101b341ee63deb173e9b704a391f8f26c613ff8ce2
BLAKE2b-256 checksum
How to use checksums
5dff44ab23f3edc3c76088c8185428f54896b83409a7065ea6e801df49a69437
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 3, 2026.

Transparency log

Security for tesserae-dl 0.1.0

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.

Select from 2 files

Attestation for tesserae_dl-0.1.0.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 Nov 3, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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