Configuration helper
Project description
Configuration helper
PyPI package: ppconfig
If you spot any problems or have any improvement ideas then feel free to open an issue and I will be glad to look into it for you.
Installation
A recommended way of installing the tool is pip install.
pip install
The tool is available in PyPI and can be installed using pip:
$ pip install --user ppconfig
Configuration
By default, configuration files are searched for in ~/.config/ (this can be overridden by class argument config_dir or environment variable XDG_CONFIG_HOME). If the config directory does not exist then it will be automatically created.
Usage
Let’s say we have ~/.config/app_name with the following contents:
[default] var1 = First Data [section_name] var2 = Some other random data
To read both variables from this file:
from ppconfig import Config config = Config(config_file='app_name') var1 = config.get('var1') var2 = config.get('var2', section='section_name')
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 ppconfig-1.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 770dc0829e3d3d80c48440211105a0fa8900049e1734eec8c86895cfbbdf0e56 |
|
MD5 | 2987f308f4259479f7bebab4f4577a5c |
|
BLAKE2b-256 | 961975b7d1c315ad6f448bc2bb61432bb05006303ffc6bac42d58706a9edda4c |