Clone this repo:


  1. 4aa9fca chore: bump version to 0.12.3 by Frost Ming · 14 days ago main
  2. bd72a0d fix: Significant slowdown on nested tables depending on syntax (#324) by Frost Ming · 14 days ago
  3. c7cb3b1 fix: Newline lost when updating a table (#323) by Frost Ming · 3 weeks ago
  4. 693b24b chore(deps-dev): bump urllib3 from 1.26.17 to 1.26.18 (#320) by dependabot[bot] · 3 weeks ago
  5. 14d742e chore: remove pycln for incompatible by Frost Ming · 4 weeks ago

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