finds.dev

samuelcolvin/rtoml

A fast TOML library for python implemented in rust.

View on GitHubHomepage ↗

★ 403PythonMITupdated Jun 2026

// the take

rtoml wraps the Rust toml crate as a Python extension via PyO3, giving you a fast, spec-compliant TOML parser with a familiar json-module-style API. It's from the pydantic author, so the quality bar is high. Aimed at anyone who parses TOML in a hot path or who has been bitten by the correctness bugs in tomllib alternatives.

The underlying toml-rs crate is battle-tested and passes the full BurntSushi TOML compliance test suite — something pure-Python libraries have historically struggled with. The none_value round-trip feature is a practical addition that TOML's spec can't express natively, and the implementation is honest about what it's doing (string sentinel, not magic). PyPI publishes pre-built wheels for Linux/macOS/Windows so most users never touch a Rust toolchain. The API surface is intentionally minimal — load/loads/dump/dumps matching json — so there's nothing surprising to learn.

At 403 stars it's a niche pick; Python 3.11+ ships tomllib in the standard library, so for read-only use cases the case for a dependency here is weak unless you actually need the write path or the none_value handling. The pretty=True serializer flag is underdocumented — it's unclear exactly what 'pretty' means in TOML terms and there's no example showing the difference. No async support, not that TOML parsing usually needs it, but worth knowing if you're loading large config files in an async context. The project is effectively a thin PyO3 glue layer; the real logic lives in upstream Rust crates, so bugs or TOML spec changes depend on upstream release cadence rather than the maintainer's own bandwidth.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
403
Forks
29
Language
Python
License
MIT
Last commit
12 Jun 2026

// nearby

If rtoml isn't quite it.

All repos →