Skip to main content

Style preserving TOML library

Project description

GitHub Release PyPI Version Python Versions License

TOML Kit - Style-preserving TOML library for Python

TOML Kit is a 1.0.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.


See the documentation for more information.


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

poetry add 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 We need the submodule - toml-test for running the tests.

You can run the tests with poetry run pytest -q tests

Project details

Download files

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

Source Distribution

tomlkit-0.12.5.tar.gz (191.4 kB view hashes)

Uploaded Source

Built Distribution

tomlkit-0.12.5-py3-none-any.whl (37.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page