Skip to main content

tomlrt

PyPI Python versions License CI Docs

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/.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tomlrt-2.2.7.tar.gz (451.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tomlrt-2.2.7-py3-none-any.whl (154.7 kB view details)

Uploaded Python 3

File details

Details for the file tomlrt-2.2.7.tar.gz.

File metadata

  • Download URL: tomlrt-2.2.7.tar.gz
  • Upload date:
  • Size: 451.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for tomlrt-2.2.7.tar.gz
Algorithm Hash digest
SHA256 b5f659d09abf60d20038dacb347e720bce4f997f228ad7abba808c52f06b8815
MD5 a88420b4ffd1c5d77b42a274a2c414a9
BLAKE2b-256 05230af5c19e3f7aab0f3b8d357cf284ca76bc2078ea1cf6b888d3f63a5e02fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for tomlrt-2.2.7.tar.gz:

Publisher: publish.yml on dimbleby/tomlrt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tomlrt-2.2.7-py3-none-any.whl.

File metadata

  • Download URL: tomlrt-2.2.7-py3-none-any.whl
  • Upload date:
  • Size: 154.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for tomlrt-2.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 cc7e3661f8c1e77dc4c68ec06b29d540192a5510d2dd8604f5b921d9ba8ee33a
MD5 33e7208722ce3d40ddd1b5dbbc01797c
BLAKE2b-256 7cdb7e7b5492cefa87f32af92e9cdf86dbb01e0c16bfa712c02805b07744b7c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for tomlrt-2.2.7-py3-none-any.whl:

Publisher: publish.yml on dimbleby/tomlrt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

2.2.11

2 files

2.2.10

2 files

2.2.9

2 files

2.2.8

2 files

This release

2.2.7 This release

2 files

2.2.6

2 files

2.2.5

2 files

2.2.4

2 files

2.2.3

2 files

2.2.2

2 files

2.2.1

2 files

2.2.0

2 files

2.1.1

2 files

2.1.0

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.8.3

2 files

1.8.2

2 files

1.8.1

2 files

1.8.0

2 files

1.7.6

2 files

1.7.5

2 files

1.7.4

2 files

1.7.3

2 files

1.7.2

2 files

1.7.1

2 files

1.7.0

2 files

1.6.1

2 files

1.6.0

2 files

1.5.0

2 files

1.4.3

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 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