TOML file reader - python module to read/write toml configuration files
Project description
TOML file reader - python module to read/write toml configuration files
Files can be loaded and saved completed with comments and formating
Configuration files can be templated and values validated on load or value changes
Two interaces:
- Simple dictionaries {key: value}
data dictionary with nested dictionary with {key: value}
template dictionary with comments/type information
template allows type, min/max and other validators to be set and stores comments
use load/save functions to open/save to file.
- Config object interface:
allows seamless use of template/data via custom dictlike interface
use cfg = Config(filename) to open
access subtables/keys via exteneded key indexing e.g. cfg[‘Table1.subtable.key’] = 1
if a template has been set any value will be validated when it is set.
if a template has been set any missing values will return the defualt and be created.
use cfg.save(filename) to save
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for toml_file-1.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc124515c35635590f057e3831dfc6831411b90a2bda310106d63478fd448495 |
|
MD5 | c8b6afbddca5ddadb16d82f6b94dbe35 |
|
BLAKE2b-256 | 54a0e316cbeb6d5028f25b9dd5a599f2eec397690bf4e31f2fda8bdc965543aa |