Simple module for creating your config files and use it in your projects. Configs may store in /etc and user local directory (~/.config).
- Python3.5 or newer
$ python3 -m pip install ovcfg
OR
$ python3 -m pip install git+https://github.com/jok4r/ovcfg.git
from ovcfg import Config
default_config = {
'first': 'first param',
'second': 'second param',
}
cfg = Config(default_config, 'config_name_here.json', 'config_dir_name').import_config()
Config file in code above will create config with local path "~/.config/config_dir_name/config_name_here.json" OR /etc/config_dir_name/config_name_here.json (if have write permissions to /etc)