← All notes

TOML basics and reading it with Python tomllib

Answer: TOML aims to be a minimal, easy-to-read configuration format with obvious semantics. It is designed to map unambiguously to a hash table.

Rules

Python

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: toml-lang/toml (GitHub), TOML specification, MIT (https://raw.githubusercontent.com/toml-lang/toml/main/LICENSE). Copyright (c) Tom Preston-Werner; Python Software Foundation (docs.python.org), tomllib — Parse TOML files, PSF-2.0 (https://docs.python.org/3/library/tomllib.html (page footer: licensed under the Python Software Foundation License Version 2; code examples Zero Clause BSD)). Copyright 2001 Python Software Foundation. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: toml-lang/toml (GitHub), TOML specification, MIT (https://raw.githubusercontent.com/toml-lang/toml/main/LICENSE). Copyright (c) Tom Preston-Werner; Python Software Foundation (docs.python.org), tomllib — Parse TOML files, PSF-2.0 (https://docs.python.org/3/library/tomllib.html (page footer: licensed under the Python Software Foundation License Version 2; code examples Zero Clause BSD)). Copyright 2001 Python Software Foundation.

Cite this

Permanent ID: iil:note:xpc9d0y6

iinventedlight. 2026. "TOML basics and reading it with Python tomllib." iinventedlight Library, iil:note:xpc9d0y6, version of 2026-11-16. https://iinventedlight.com/library/notes/toml-basics/. License: CC-BY-4.0.

@misc{iil_note_xpc9d0y6,
  author = {{iinventedlight}},
  title = {{TOML basics and reading it with Python tomllib}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-16},
  url = {https://iinventedlight.com/library/notes/toml-basics/},
  note = {Permanent ID iil:note:xpc9d0y6. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/toml-basics.md.