finds.dev← search

// the find

samuelcolvin/rtoml

★ 403 · Python · MIT · updated Jun 2026

A fast TOML library for python implemented in rust.

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.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →