utility library to find and load configuration files
Project description
config-library
utility library to find and load configuration files
Installation
pip install config-library
Usage Example
import configs
config = configs.findAndLoad('app.conf', 'project')
project-structure
/
├─ etc/
├─ home/user/
│ ├─ path/to/repo/
│ │ ├─ src/code/
│ │ │ ├─ main.py
│ ├─ .config/
places to search for the config-file
- /home/user/path/to/repo/src/code/app.conf
- /home/user/path/to/repo/src/code/project/app.conf
- /home/user/path/to/repo/app.conf
- /home/user/path/to/repo/project/app.conf
- /home/user/.config/app.conf
- /home/user/.config/project/app.conf
- /etc/app.conf
- /etc/project/app.conf
Supported Config-Types
- .json
- .ini/.conf
- .toml (python3.11+)
- .yaml (if
pyyaml
is installed)
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
config-library-0.2.0.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for config_library-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9c5f827131c03700f0803e1ccd1e683646715dc777e9edfc68a715c1f4babec |
|
MD5 | d1dcdb22549a5dd157d8055f92abb0c4 |
|
BLAKE2b-256 | f427679128e0261fa7eb428b412cb1a7e237e76f518ae74c78370379c4184308 |