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
File details
Details for the file toml_file-1.0.7.tar.gz
.
File metadata
- Download URL: toml_file-1.0.7.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a10abf67331ba3d52bff2c65474a7f1bccf398aa236757e8af14b528bca566f |
|
MD5 | a10cff40f65659e4bc0fb88f23403403 |
|
BLAKE2b-256 | c65789a7930cbf5d749fbc8bf16db79f9405b649c5f5015e33bfb8467d90b1cc |
File details
Details for the file toml_file-1.0.7-py2.py3-none-any.whl
.
File metadata
- Download URL: toml_file-1.0.7-py2.py3-none-any.whl
- Upload date:
- Size: 23.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69b9409aa04556a5ee78ae1eae4ff1c3d2f77cb0e4fcc10a440da30afff780bd |
|
MD5 | de1c1a12ca9e3bce07fc9b44f75041e5 |
|
BLAKE2b-256 | e6c7312e007e9da1ba89a0d521cdd52d24c68469b559fb09336d19c4520f6ee6 |