Clone this repo:
  1. da95312 feat: enhance custom encoders to accept _parent and _sort_keys parameters (#436) by Frost Ming · 2 weeks ago main
  2. d81c1ef [pre-commit.ci] pre-commit autoupdate (#434) by pre-commit-ci[bot] · 2 weeks ago
  3. cc148ea fix: Add DottedKey to a super table gives wrong output (#431) (#435) by Marnix · 3 weeks ago
  4. 717757d chore(deps): bump requests from 2.32.3 to 2.32.4 in /docs (#432) by dependabot[bot] · 5 weeks ago
  5. 983ffe5 chore(deps): bump jinja2 from 3.1.5 to 3.1.6 in /docs (#433) 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.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.

Usage

See the documentation for more information.

Installation

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 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