pytoml
A parser for TOML-0.4.0
What it is and what it does
pytoml is a TOML file parser and serializer that mirrors the standard library's json module interface. It reads TOML configuration files into Python dictionaries and writes dictionaries back to TOML format. The library accepts both bytes (UTF-8 decoded) and unicode strings as input, making it straightforward to integrate into configuration-loading workflows.
The package is deprecated and no longer maintained. Its last release was in 2019, and the project's own documentation recommends using alternatives. While it remains functional for TOML 0.4.0 files and has no known vulnerabilities, new projects should consider more actively maintained options.
Use it for:
- Loading application configuration from TOML files in legacy projects still using this library
- Reading TOML-formatted settings in Python 2.7 or early Python 3 codebases where migration is not yet planned
- Parsing TOML 0.4.0 files in environments where dependency updates are constrained
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses and writes TOML configuration files with a JSON-like interface, supporting TOML version 0.4.0.
No, unless you are maintaining legacy code already using pytoml. The project is explicitly deprecated and unmaintained since 2019. For new projects, use an actively maintained TOML parser instead. The package itself is stable and has no known vulnerabilities, but the lack of maintenance means no fixes for future TOML spec changes or Python compatibility issues.
Install
pytoml on PyPI
pip
pip install pytomluv
uv add pytomlpoetry
poetry add pytomlInstalling pytoml
Before you install
Low install friction with no runtime dependencies. However, the project is no longer actively maintained—the last release was in 2019, and the maintainer explicitly recommends considering alternatives.
License in practice
MIT license permits commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license notice.
Quickstart
pip install pytoml
import pytoml as toml
obj = toml.loads('a = 1')
print(obj)
with open('file.toml', 'rb') as fin:
obj = toml.load(fin)
Requires Python 2.7+ or 3.5+; input bytes must be UTF-8 encoded with no BOM.
Verify before relying
- Whether TOML 0.4.0 support is sufficient for current use cases or if newer TOML spec versions are needed
- How the package compares in correctness or performance to actively maintained alternatives
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 2,581 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 604,635/month — #5,803 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytoml-0.1.21-py2.py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
rtomlrtoml parses and serializes TOML files and…
permissive · top 5,000 on PyPI
tomlParses and generates TOML configuration files,…
permissive · top 1,000 on PyPI
tomlrtReads and writes TOML files while preserving…
permissive · top 15,000 on PyPI
tomliTomli parses TOML configuration files and…
permissive · top 1,000 on PyPI
tomlkitParses and edits TOML files while preserving…
permissive · top 1,000 on PyPI
types-tomlProvides type hints for the toml package,…
permissive · top 1,000 on PyPI
tomli-wTomli-W serializes Python dictionaries to TOML…
permissive · top 1,000 on PyPI
python-frontmatterParses and manages text files with YAML (or…
permissive · top 5,000 on PyPI
libconfReads and writes configuration files in…
permissive · top 15,000 on PyPI
toml-rsA high-performance TOML parser and serializer…
permissive · top 15,000 on PyPI