tomli | pytoml | |
---|---|---|
5 | 3 | |
439 | 129 | |
- | - | |
3.0 | 10.0 | |
5 days ago | almost 5 years ago | |
Python | Python | |
MIT License | GNU General Public License v3.0 or later |
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
-
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.
pytoml
-
TOML: Tom's Obvious Minimal Language
Funny thing: TOML author/inventor calls it a mistake:
> TOML is a bad file format. It looks good at first glance, and for really really trivial things it is probably good. But once I started using it and the configuration schema became more complex, I found the syntax ugly and hard to read.
> I personally abandoned TOML and as such, I'm not planning on adding any new features
https://github.com/avakar/pytoml/issues/15#issuecomment-2177...
-
Comparison of Python TOML parser libraries
pytoml Abandoned by the creator for eminently sensible reasons (interesting read too... https://github.com/avakar/pytoml/issues/15) But let's not get into an argument over whether a shiny new fashion in config formats is in fact doing anything better than the previous fashions in config management...
What are some alternatives?
toml - Tom's Obvious, Minimal Language
rtoml - A fast TOML library for python implemented in rust.
tomlkit - Style-preserving TOML library for Python
toml - Python lib for TOML
pip - The Python package installer
tomlplusplus - Header-only TOML config file parser and serializer for C++17.
pytomlpp - A python wrapper for tomlplusplus
flit - Simplified packaging of Python modules
JSON6 - JSON for Humans (ES6)