Python library that simplifies parsing and creating Toml configuration files.
Project description
toml_config
Python library that simplifies parsing and creating Toml configuration files. Wrapper on toml
installation
To install a module run the command:
pip install toml_config
Using
To get started, import the module. Create an instance of the Config class by passing as a parameter the path to an existing file or the path where this file will be created.And then you can read parameters from the file and write parameters to the file.
Example. Creating a file and writing values.
main.py
:
from toml_config.core import Config
my_config = Config('app.config.toml')
my_config.add_section('app').set(key='value',other_key=[1,2,3])
app.config.toml
:
[app]
key = "value"
other_key = [ 1, 2, 3,]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
toml_config-0.1.2.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for toml_config-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8389257b4a7b2d07b5ff4430e8cd28347346fbb721210b40e301a81115893188 |
|
MD5 | 6e765db1e40c0c1cfa4322738ad395bf |
|
BLAKE2b-256 | 00f859289afd24fc36d8f1c45d5659525b271de6c4c645758f3266e678568885 |