tomli
A lil' TOML parser (by hukkin)
tomlkit
Style-preserving TOML library for Python (by python-poetry)
tomli | tomlkit | |
---|---|---|
5 | 3 | |
439 | 627 | |
- | 1.6% | |
3.0 | 7.1 | |
5 days ago | 5 days ago | |
Python | Python | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
tomli
Posts with mentions or reviews of tomli.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-09-13.
-
What Is Wrong with TOML?
But the whitespace handling involved is an extra complication, at least the provided example fails to be parsed by `tomli`, which is following the currently release TOML spec: https://github.com/hukkin/tomli/issues/199
-
ConfigParser potential inconsistencies
ini files aren't standardized, the syntax is really "whatever the parser implements". For new projects I recommend using toml instead. It's ini-like, but standardized. Python 3.11 even comes with a builtin parser tomllib (earlier python versions can use tomli, which is what tomllib is based on).
-
Python 3.11 will now have tomllib - Support for Parsing TOML in the Standard Library
tomllib is primary the library tomli: https://github.com/hukkin/tomli
-
Upcoming Python Features Brought to You by Python Enhancement Proposals
TOML as a format is by default used by many Python tools, including build tools. This creates a bootstrapping problem for them. Additionally, many popular tools such as flake8 don't include TOML support citing its lack of support in standard library. This PEP proposes to add TOML support to standard library based on tomli which is already used by packages such as pip or pytest.
-
Comparison of Python TOML parser libraries
tomli Relatively fast read-only parsing. Companion library tomli-w for writing.
tomlkit
Posts with mentions or reviews of tomlkit.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-12-14.
- Configuration file format that supports hex and comments?
-
Confiig file
I like to use TOML files. I find the syntax to be more palatable than YAML, and you can load them quite easily with tomlkit. I believe there's a PEP to add a parser to the standard library too, since they're used for pyproject.toml now.
- Comparison of Python TOML parser libraries
What are some alternatives?
When comparing tomli and tomlkit you can also consider the following projects:
toml - Tom's Obvious, Minimal Language
pytoml - A TOML-0.4.0 parser/writer for Python.
rtoml - A fast TOML library for python implemented in rust.
toml - Python lib for TOML
mypy - Optional static typing for Python
tomlplusplus - Header-only TOML config file parser and serializer for C++17.
qtoml - Another Python TOML encoder/decoder
flit - Simplified packaging of Python modules
pip - The Python package installer