Skip to main content

Parse config options from the OS environment.

Project description

A module for reading configuration values from the OS environment variables.

Compared to using straight os.getenv() this module provides a view convenience functions, for example, for parsing booleans.

I was not happy with using straight os.getenv() because we’ve had a number of errors that were related to missing config values in .env files. This module should help with that by providing a clean way for accessing config variables.


$ pip install envconfig
import envconfig

boolopt = envconfig.bool("BOOL_OPTION")
stropt ="STRING_OPTION")
listopt = envconfig.list("LIST_OPTION")
dictopt = envconfig.dict("DICT_OPTION")


Daniel Bader –

Distributed under the MIT license. See LICENSE.txt for more information.


0.2.0 (2021-07-23)

  • Add envconfig.dict()

0.1.0 (2013-05-27)

  • Initial release

Project details

Download files

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

Source Distribution

envconfig-0.2.0.tar.gz (4.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page