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.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2243c02424c2a57120f300a3e87b6d3b9694f45a00f810ec90aee694b694694 |
|
MD5 | 2d999045750b3aefdebf1f2fefb86a1b |
|
BLAKE2b-256 | 2f8a2a3d12f8bee612cbb31075c1d540b98d3787642c863ae9268601e83b702d |