Welcome to django-environ documentation¶
Release v0.10.0 (What's new?).
django-environ is the Python package that allows you to use
Twelve-factor methodology to configure your
Django application with environment variables.
The idea of this package is to unify a lot of packages that make the same stuff:
Take a string from
os.environ, parse and cast it to some of useful python
typed variables. To do that and to use the 12factor
approach, some connection strings are expressed as url, so this package can parse
it and return a
urllib.parse.ParseResult. These strings from
are loaded from a
.env file and filled in
method, to avoid to overwrite the real environ.
A similar approach is used in Two Scoops of Django
book and explained in 12factor-django
django-environ you can stop to make a lot of unversioned
settings_*.py to configure your app.
for a concrete example on using with a django project.
Fast and easy multi environment for deploy
os.environwith .env file variables
Url variables exploded to django specific package settings
Optional support for Docker-style file based config variables (use
Full Table of Contents¶
The User Guide¶
This part of the documentation, which is mostly prose, begins with some background information about django-environ, then focuses on step-by-step instructions for getting the most out of django-environ.
The Community Guide¶
This part of the documentation, which is mostly prose, details the django-environ ecosystem and community.
- Supported types
The API Documentation / Guide¶
If you are looking for information on a specific function, class, or method, this part of the documentation is for you.
The Contributor Guide¶
If you want to contribute to the project, this part of the documentation is for you.
Should you have any question, any remark, or if you find a bug, or if there is
something you can’t do with the
open an issue.
It’s rigorously tested on Python 3.5+, and officially supports Django 1.11, 2.2, 3.0, 3.1, 3.2 and 4.0.
If you’d like to contribute to
django-environ you’re most welcome!