tomlrt
A format-preserving TOML reader and writer for Python.
Parse a document, edit it, dump it, and the bytes you didn't touch round-trip exactly — comments, whitespace, string style, and number formatting all intact.
Supports TOML 1.1.
import tomlrt
with open("pyproject.toml", "rb") as f:
doc = tomlrt.load(f)
doc["project"]["version"] = "0.2.0"
doc["project"]["dependencies"].append("requests>=2")
print(tomlrt.dumps(doc)) # comments and layout are preserved
Build a document from scratch:
from tomlrt import Document, dumps
doc = Document({"project": {"name": "demo", "version": "0.1.0"}})
print(dumps(doc))
Documentation
Full docs at https://dimbleby.github.io/tomlrt/.
Release files for tomlrt 2.2.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tomlrt-2.2.14.tar.gz | 471.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tomlrt-2.2.14-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 624.2 kB
Release files / tomlrt-2.2.14.tar.gz
| Download URL | tomlrt-2.2.14.tar.gz |
|---|---|
| Size | 471.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5544d9bf229eba6dc8737c18de28b06b222c6f0992f0e5cd042c8b2e9e397ec2
|
|
BLAKE2b-256 checksum How to use checksums |
afe50e9af14bd292ffdb6eb7b4ba790cb4a27975579a67457792140778713786
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 25, 2026.
Transparency logRelease files / tomlrt-2.2.14-py3-none-any.whl
| Download URL | tomlrt-2.2.14-py3-none-any.whl |
|---|---|
| Size | 152.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6e4c521cf47ea0e0329b96e6f8de8c02f23bbc67d8490ea344b087f8e912cc17
|
|
BLAKE2b-256 checksum How to use checksums |
cc20e035b90fbdf445aedbd6b7353b57de96c8f813ebf0756d1b80dc1b2a085f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 25, 2026.
Transparency log