Skip to main content

GitHub Release PyPI Version Python Versions License
Tests

TOML Kit - Style-preserving TOML library for Python

TOML Kit is a 1.1.0-compliant TOML library.

It includes a parser that preserves all comments, indentations, whitespace and internal element ordering, and makes them accessible and editable via an intuitive API.

You can also create new TOML documents from scratch using the provided helpers.

Part of the implementation has been adapted, improved and fixed from Molten.

Usage

See the documentation for more information.

Limitations

tomlkit preserves the original layout of a document, with one exception: a sub-table that extends an array of tables out of order — for example a [fruit.apple.texture] header that appears after [[fruit]] with an unrelated table in between — is normalized into the array's last element when the document is re-serialized, rather than kept at its original position. The data is preserved; only the physical placement of that sub-table changes.

Installation

If you are using uv, you can add tomlkit to your pyproject.toml file by using:

uv add tomlkit

Or just:

uv pip install tomlkit

If not, you can use pip:

pip install tomlkit

Running tests

Please clone the repo with submodules with the following command:

git clone --recurse-submodules https://github.com/python-poetry/tomlkit.git

The toml-test submodule is required for running the tests.

You can then run the tests with

poetry run pytest -q tests

Metadata

Release files for tomlkit 0.15.3

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

Source distribution (sdist)

Source distribution for tomlkit 0.15.3
File Size Uploaded Provenance Actions
tomlkit-0.15.3.tar.gz 204.4 kB Without provenance Details for tomlkit-0.15.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tomlkit 0.15.3
File Interpreter ABI Platform Actions
tomlkit-0.15.3-py3-none-any.whl Python 3 none any Details for tomlkit-0.15.3-py3-none-any.whl

Total release size: 259.9 kB

Release files / tomlkit-0.15.3.tar.gz

Download URL tomlkit-0.15.3.tar.gz
Size 204.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b3c3020ec1a4bd469d12e31fb4da938e7f6ba758cdbec3fd9047db63120eaf81
BLAKE2b-256 checksum
How to use checksums
c9854a7c68111c057a6498f5bc721ef93b388b420bb31d7020759f18a5f0c2ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.2 CPython/3.14.4 Linux/7.0.0-1020-azure

Release files / tomlkit-0.15.3-py3-none-any.whl

Download URL tomlkit-0.15.3-py3-none-any.whl
Size 55.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a83ce6de3b648e68dd9b50aabadad749ba823eb58b1d026f3c0a283c4767a9c1
BLAKE2b-256 checksum
How to use checksums
c3496b0a22e69c844c0b18cb66c206bdd791693d0cf845badc5f84e6448f2192
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.2 CPython/3.14.4 Linux/7.0.0-1020-azure

Security for tomlkit 0.15.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.15.3 This release

2 release files No 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