Simple layered configuraion tool
Project description
Compendium
Overview
Compendium is a simple configuration management tool. It has the capability to manage configuration files writen in JSON, TOML, XML and YAML. Settings from these configuration files can then be managed easily with the help of dpath.
Documentation
https://kuwv.github.io/python-compendium/
Install
pip install compendium
Manage multiple configurations
Example afile.toml
:
[default]
foo = "bar"
Example bfile.toml
:
[example.settings]
foo = "baz"
from compendium.config_manager import ConfigManager
cfg = ConfigManager(name='app', filepaths=['afile.toml', 'bfile.toml'])
result = cfg.lookup('/default/foo', '/example/settings/foo')
assert result == 'baz'
Search settings
result = cfg.search('/servers/**/ip')
Create settings
cfg.create('/test', 'test')
Update settings
cfg.set('/owner/name', 'Tom Waits')
Delete settings
cfg.delete('/owner/name')
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
compendium-0.1.2.post0.tar.gz
(16.1 kB
view hashes)
Built Distribution
Close
Hashes for compendium-0.1.2.post0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a549656ef786e4a2f692f9120bd76152798f9517b7af6a6ba8b2d0d45924a94 |
|
MD5 | b508d4774b46c1b0ebe25dea342ae96e |
|
BLAKE2b-256 | 2f4fe5d1cad348a56dd4a59e3d535684f4c3a0f1b40cb03c779d561d82465cbd |