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.10.2.tar.gz (184.5 kB view hashes)

Uploaded source

Built Distribution

tomlkit-0.10.2-py3-none-any.whl (34.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page