Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Read settings from environment variables.

Project Description

Easily read settings from environment variables. Reading settings from environment variables allows complete isolation between application and configuration data.

Read the Twelve-Factor App’s relevant section for more rationale behind this approach.


The following example will read the environment variables into configuration values host, port, and debug, cast to the expected type:

from envsettings import SettingsReader

r = SettingsReader(
    host=("HOST", "host", str),
    port=("PORT", "port", int),
    debug=("DEBUG", "debug", bool),

if r.debug:
   print("Running in debug mode"), r.port, debug=r.debug)

Boolean values can be either true, yes, or on and are case insensitive.


Any feedback is welcome, and please report any bugs you encounter on the project’s issue tracker.

Patches or merge requests are welcome.


envsettings is licensed under the ISC licence (functionally equivalent to the MIT licence). See for details.

Copyright (c) 2014-2015 Hugo Osvaldo Barrera <>

Release History

This version
History Node


History Node


History Node


History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(3.9 kB) Copy SHA256 Hash SHA256
Wheel py3 Jan 21, 2017
(3.4 kB) Copy SHA256 Hash SHA256
Source None Jan 21, 2017

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers