tomli
ansible-dhall-jsonnet | tomli | |
---|---|---|
2 | 5 | |
6 | 443 | |
- | - | |
0.0 | 3.0 | |
over 3 years ago | 22 days ago | |
Dhall | Python | |
BSD 3-clause "New" or "Revised" License | MIT License |
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.
ansible-dhall-jsonnet
-
What Is Wrong with TOML?
Maybe you'd like jsonnet: https://jsonnet.org/
I find it particularly useful for configurations that often have repeated boilerplate, like ansible playbooks or deploying a bunch of "similar-but" services to kubernetes (with https://tanka.dev).
Dhall is also quite interesting, with some tradeoffs: https://dhall-lang.org/
A few years ago I did a small comparison by re-implementing one of my simpler ansible playbooks: https://github.com/retzkek/ansible-dhall-jsonnet
-
Intercal, YAML, and Other Horrible Programming Languages
A few months ago I explored using Dhall and Jsonnet to re-write an Ansible playbook [0,1]. I wanted to like Dhall, but found the type system got in the way more than it helped, while Jsonnet was very productive and a huge improvement over YAML.
[0] https://www.kmr.me/posts/dhall_jsonnet
[1] https://github.com/retzkek/ansible-dhall-jsonnet
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.
What are some alternatives?
Pulumi - Pulumi - Infrastructure as Code in any programming language 🚀
toml - Tom's Obvious, Minimal Language
wasp - The fastest way to develop full-stack web apps with React & Node.js.
tomlkit - Style-preserving TOML library for Python
config - configuration library for JVM languages using HOCON files
rtoml - A fast TOML library for python implemented in rust.
dhall-lang - Maintainable configuration files
pytoml - A TOML-0.4.0 parser/writer for Python.
ShellCheck - ShellCheck, a static analysis tool for shell scripts
toml - Python lib for TOML
RailsConfig - Easiest way to add multi-environment yaml settings to Rails, Sinatra, Padrino and other Ruby projects.
tomlplusplus - Header-only TOML config file parser and serializer for C++17.