Another Python configuration tool
Project description
Cool Config
Simple way to use configuration files with Python configuration model.
Usage
Simple usage example:
from cool_config import *
class Config(AbstractConfig):
"""
Configuration model inherits from AbstractConfig, and all configuration sections from Section
"""
class main(Section):
a = Integer
b = Integer
config = Config() # global cpnfiguration object
if __name__ == '__main__':
config_data = {
'main': {
'a': 5
},
'b': 42
}
config.load_from_dict(config_data) # initialize configuration from dict
# config.load('config.yml') # or initialize configuration with config.yml
print(config.main.a) # 5
print(config.b) # 42
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
cool_config-0.1.0.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for cool_config-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e56541b4352a2a08a642d7e90740ba93c0a2f8fcadbaed82179a8931855ffe48 |
|
MD5 | d2313745a0533a53edffb8bb3c13e421 |
|
BLAKE2b-256 | 6b92612ad0ff893b053789c239743e7ebc75ffac782917de1fabbfd397297ff6 |