Clone this repo:
  1. 9bfc89d docs: update compliance version to 1.1.0 and installation instructions in README.md by Frost Ming · 14 days ago main
  2. 6303b47 chore(deps-dev): bump virtualenv from 20.26.6 to 20.36.1 (#454) by dependabot[bot] · 14 days ago
  3. 992494a [pre-commit.ci] pre-commit autoupdate (#455) by pre-commit-ci[bot] · 14 days ago
  4. 4159098 feat(spec): update to toml spec v1.1 (#456) by Frost Ming · 14 days ago
  5. c6223a2 chore(deps-dev): bump setuptools from 70.0.0 to 78.1.1 (#453) by dependabot[bot] · 5 weeks ago

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.

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