utility library to find and load configuration files
Project description
py-config-lib
utility library to find and load configuration files
Usage Example
import config_lib
config = config_lib.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.1.0.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for config_library-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1afc9ee4f0468f13148487a53f9bd0dd31b88400a36dc32045901c16eb30f7d5 |
|
MD5 | 36393199747bdac139b3df588a6e08ce |
|
BLAKE2b-256 | 5db78f04a9e6713f74502907f52020fb1ca4ca933fd65a91a247813db8380c9f |