Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Python dict that supports common app configuration-loading scenarios.

Project description

https://travis-ci.org/adblair/configloader.svg?branch=master https://coveralls.io/repos/adblair/configloader/badge.svg?branch=master&service=github https://img.shields.io/pypi/dm/configloader.svg

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')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for configloader, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size configloader-1.0.1-py2.py3-none-any.whl (6.5 kB) File type Wheel Python version 3.4 Upload date Hashes View hashes
Filename, size configloader-1.0.1.tar.gz (15.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page