Python dict that supports common app configuration-loading scenarios.
Project description
ConfigLoader is a Python dictionary subclass that provides convenience methods for common app configuration-loading scenarios, inspired by flask.Config.
Features
Easily load config settings from:
Python modules, classes or objects
JSON files
YAML files
Environment variables
Supports Python 2.6+ and 3.3+.
Installation
Install ConfigLoader from PyPI using pip:
pip install configloader[all]
The [all] indicates that all optional dependencies (AttrDict and PyYAML) should be installed.
Example usage
>>> from configloader import ConfigLoader >>> config = ConfigLoader >>> config.update_from_object('my_app.settings') >>> config.update_from_yaml_env('YAML_SETTINGS_PATH')
Documentation
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
configloader-1.0.0.tar.gz
(15.2 kB
view hashes)
Built Distribution
Close
Hashes for configloader-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d33f7e0b04d064476409119643edd52585ccc43972a74d8ae0189465f57f906e |
|
MD5 | e8d22a6f5802da04b3134b96220f24e9 |
|
BLAKE2b-256 | c5af56f2b7c0edb7d4033902de866b571c21cadbc35c5fdeecc6f8246aa0a158 |