skillfed

tomlkit

Style preserving TOML library

tomlkit Permissive license MIT Active 842 v0.15.1 released

Install

tomlkit on PyPI

pip

pip install tomlkit

uv

uv add tomlkit

poetry

poetry add tomlkit

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 27 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: tomlkit-0.15.1-py3-none-any.whl

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

About tomlkit

from the package's own PyPI description — quoted content, verbatim

GitHub Release (image) PyPI Version (image) Python Versions (image) License (image) <br> Tests (image)

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

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

tomlkit parses and edits TOML 1.1.0 files while preserving comments, whitespace, indentation, and element order, then serializes them back with formatting intact.

Low friction: pure Python wheel with zero runtime dependencies and active maintenance (latest release 27 days ago, last commit 2026-08-10). Supports Python 3.9–3.14.

MIT license permits commercial and private use with minimal restrictions; you must retain the license notice in distributions.

Usage

pip install tomlkit

import tomlkit

doc = tomlkit.parse('[section]\nkey = "value"')
doc['section']['key'] = 'new_value'
print(tomlkit.dumps(doc))

Verdict: tomlkit is a well-maintained, dependency-free TOML library ideal for applications that need to read and modify TOML files without losing formatting. No known vulnerabilities, permissive MIT license, and broad Python version support make it a safe, production-ready choice.

Needs verification

  • Performance characteristics and memory footprint for very large TOML files
  • Extent to which the documented sub-table normalization limitation affects real-world use cases
toml parser pythonedit toml files preserve formattingstyle preserving toml librarytoml configuration reader writertoml with comments preservedtoml 1.1.0 compliant parsertoml document manipulation

Similar packages