skillfed

tomli

A lil' TOML parser

tomli Permissive license MIT Active 570 v2.4.1 released

Install

tomli on PyPI

pip

pip install tomli

uv

uv add tomli

poetry

poetry add tomli

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 141 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: tomli-2.4.1-py3-none-any.whl

Keywords: toml

Operating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

About tomli

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

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

Tomli parses TOML configuration files into Python dictionaries. It provides a lightweight, pure-Python parser compatible with TOML v1.1.0 and offers a backport for Python versions before 3.11 when the standard library tomllib is unavailable.

Tomli has zero runtime dependencies and installs as a pure Python wheel with no compilation required, making it frictionless to add. The project is actively maintained with recent releases and 570 GitHub stars.

Tomli is released under the MIT license, a permissive license that allows free use, modification, and distribution with minimal restrictions, making it safe for both open-source and commercial projects.

Usage

pip install tomli

import tomli

with open("config.toml", "rb") as f:
    config = tomli.load(f)

# or parse a string:
data = tomli.loads("key = 'value'")

TOML files must be opened in binary mode ("rb") to ensure UTF-8 decoding with universal newlines disabled, as required by the TOML specification.

Verdict: Tomli is a reliable, minimal TOML parser with no dependencies, active maintenance, and MIT licensing. It's well-suited for configuration file parsing across Python 3.8+ and serves as a backport for users on Python versions before 3.11. No known vulnerabilities.

Needs verification

  • Performance comparison with tomllib in Python 3.11+ to assess whether mypyc-compiled wheels justify adoption over the standard library
  • Whether the package's 100% branch coverage claim and spec compliance against toml-lang/toml-test have been independently verified
toml parser pythonparse toml filestoml configuration readertoml to dictlightweight toml librarypure python tomltoml v1.1.0 parser

Similar packages