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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ppconfig-1.0.3.tar.gz.
File metadata
- Download URL: ppconfig-1.0.3.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
417a3f4ef4d3db1721a3c6f05a423fbbb4c8b5aa7c1132827f9f14f862cc9ca0
|
|
| MD5 |
8af465d4a20d570dd1f646685805b3a6
|
|
| BLAKE2b-256 |
7e123dd6a12f46b6f765c83203aeec8f0d2ce1722ac7a51dd24e71155ad14fa2
|
File details
Details for the file ppconfig-1.0.3-py2.py3-none-any.whl.
File metadata
- Download URL: ppconfig-1.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
770dc0829e3d3d80c48440211105a0fa8900049e1734eec8c86895cfbbdf0e56
|
|
| MD5 |
2987f308f4259479f7bebab4f4577a5c
|
|
| BLAKE2b-256 |
961975b7d1c315ad6f448bc2bb61432bb05006303ffc6bac42d58706a9edda4c
|