--- id: toml-rs version: "0.3.16" license: Unlicense license_treatment: permissive maintenance: active --- # toml-rs — A High-Performance TOML Parser for Python written in Rust License: permissive · Maintenance: active · Downloads: 104.6K/mo ## What it is and what it does toml-rs is a TOML parser and serializer implemented in Rust and exposed to Python, designed as a faster alternative to the standard library's tomllib. It parses TOML v1.0.0 and v1.1.0 into Python dictionaries and can serialize Python dictionaries back to TOML format. The package aims for drop-in compatibility with tomllib for most use cases, though it adds features like serialization (dumps/dump methods) and provides more detailed error messages that pinpoint parse failures with context. The package has no runtime dependencies beyond Python itself, making installation straightforward on supported platforms. It supports Python 3.10 through 3.15 and runs on CPython and PyPy. The Rust implementation is the core differentiator—it trades the simplicity of a pure-Python parser for speed, which matters most when parsing large TOML files or in performance-sensitive applications. Use it for: - Replace tomllib in projects requiring faster TOML parsing or better error diagnostics - Serialize Python configuration objects back to TOML files for config management workflows - Parse TOML configuration files in CLI tools or build systems where performance is measurable - Handle TOML v1.1.0 features in applications that need newer TOML spec support - Migrate from other TOML libraries while maintaining mostly compatible code ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A high-performance TOML parser and serializer for Python, written in Rust, with drop-in compatibility for most tomllib use cases and support for TOML v1.0.0 and v1.1.0. Yes, if you need TOML parsing and either want faster performance than tomllib or need serialization support. The package is actively maintained, has no dependencies, and carries permissive licensing. Install friction is moderate due to compilation, but prebuilt wheels cover common platforms. No known vulnerabilities. Not necessary if tomllib's speed and read-only API suit your use case. ## Install pip install toml-rs uv add toml-rs poetry add toml-rs ## Installing toml-rs Before you install: Medium install friction due to compiled wheels; prebuilt binaries available for common platforms (macOS, Linux, Windows across multiple architectures). Actively maintained with recent releases; repository shows 32 stars and last commit on 2026-08-14. License in practice: Licensed under Unlicense (permissive), placing the package in the public domain with no restrictions on use, modification, or distribution. Quickstart: pip install toml-rs import toml_rs toml_string = 'title = "Example"\n[section]\nkey = "value"' data = toml_rs.loads(toml_string) output = toml_rs.dumps(data) Requires Python 3.10 or later; precompiled wheels available for most platforms but installation may require compilation on unsupported architectures. Verify before relying: - Actual performance comparison with tomllib and other TOML parsers (benchmarks referenced but not provided in fact sheet) - Completeness of tomllib compatibility beyond the stated differences - Support status for PyPy implementation (listed in classifiers but not detailed) ## Package facts - License: Unlicense (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 104.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags toml parser python, fast toml parsing, toml serialization, toml v1.0 v1.1, rust toml library, tomllib alternative, toml dumps loads, toml-parsing, rust-binding, config-format [View on SkillFed](https://skillfed.io/packages/toml-rs) · [View on PyPI](https://pypi.org/project/toml-rs/)