Skip to content

Tom’s Obvious Minimal Language (TOML)

TOML, short for Tom’s Obvious Minimal Language, is a configuration file format that pairs human-readable syntax with an unambiguous mapping to a hash table of keys and typed values.

A TOML document is a set of key/value pairs, optionally grouped into named tables. A table is a section introduced by a bracketed header, and it maps to a dictionary when Python parses the document. Every value carries a type, from strings, integers, floats, and Booleans to dates, times, arrays, and nested tables. Unlike JSON, TOML allows comments, and unlike YAML, it doesn’t lean on indentation to convey structure.

Tom Preston-Werner introduced the format in 2013, version 1.0.0 of the specification landed in 2021, and version 1.1.0 followed in December 2025. TOML has since become the standard configuration format across the Python packaging ecosystem, where pyproject.toml records a project’s build system and metadata. Rust’s Cargo and many linters and formatters read TOML as well.

Since Python 3.11, the standard library has shipped tomllib to parse TOML files. The module reads TOML 1.0.0 but can’t write it, so creating a TOML document calls for a third-party library like Tomli-W or TOML Kit.

A typical pyproject.toml slice shows the format’s bracketed tables and typed values:

Language: TOML
[project]
name = "rp-sample"
version = "0.1.0"
requires-python = ">=3.11"
keywords = ["configuration", "packaging"]
Python 3.11 Preview: TOML and tomllib

Tutorial

Python 3.11 Preview: TOML and tomllib

Python 3.11 will be released in October 2022. In this tutorial, you'll install the latest beta release of Python 3.11 in order to preview the new tomllib module that's added to the standard library. You'll also explore some of the static typing enhancements that are coming.

intermediate data-structures python

For additional information on related topics, take a look at the following resources:


By Martin Breuss • Updated Aug. 15, 2026