$npx skillfedfor your agent

django-environ

A package that allows you to utilize 12factor inspired environment variables to configure your Django application.

Worth itPyPI Python ModulesReleased Jun 20268.6M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_environ-0.14.0-py3-none-any.whl
v0.14.0 · released 2026-06-18 · Python <4,>=3.9 · 1 runtime deps: typing_extensions

Yes. django-environ is production-stable, actively maintained, has no known vulnerabilities, minimal install friction, and solves a standard Django configuration problem. It is widely adopted (top 5000 PyPI packages) and supports current Django and Python versions. Install it if you use Django and want environment-based configuration following industry best practices.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later; Django 2.2+ for full compatibility.
  • Low friction installation with a single runtime dependency (typing_extensions).
  • Active maintenance with a recent release 57 days ago and consistent commit activity; classifiers indicate production-stable status and support across Django 2.2 through 6.0.

License · maintenance · safety

MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; suitable for most projects without licensing concerns.

last release 2026-06-18 (57 days) · last repo commit 2026-08-12 · 3,164 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 8,557,519 downloads/mo, #1,606 on PyPI

Verify before relying

pip install django-environ

import environ
import os

env = environ.Env(DEBUG=(bool, False))
environ.Env.read_env('.env')
DEBUG = env('DEBUG')
DATABASES = {'default': env.db()}
  • Performance characteristics when handling large numbers of environment variables or complex .env files
  • Specific behavior differences between Env and FileAwareEnv for Docker-style file-based secrets
Same gist for agents: .md · .json

What it is and what it does

django-environ bridges environment variables and Django settings by reading .env files and parsing their contents into typed Python objects. It implements the Twelve-Factor methodology, which treats configuration as environment-provided data rather than code, eliminating the need for multiple settings files per deployment environment.

The package handles three main tasks: loading variables from .env files into os.environ, casting string values to Python types (bool, int, list, etc.), and parsing connection URL strings (database, cache, email) into Django-compatible configuration dictionaries. It raises Django's ImproperlyConfigured exception when required variables are missing, catching configuration errors early. The single runtime dependency is typing_extensions, and it supports Python 3.9 through 3.14 across Django versions 2.2 to 6.0.

Use it for

  • Store database credentials and URLs in .env files without committing them to version control
  • Switch between development, staging, and production configurations by changing environment variables
  • Parse Redis and cache URLs into Django CACHES configuration dictionaries
  • Enable Docker deployments using file-based secrets mounted as environment variables
  • Centralize Django settings configuration in a single file instead of maintaining multiple settings_*.py variants

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

django-environ is production-stable, actively maintained, has no known vulnerabilities, minimal install friction, and solves a standard Django configuration problem. It is widely adopted (top 5000 PyPI packages) and supports current Django and Python versions. Install it if you use Django and want environment-based configuration following industry best practices.

Install

django-environ on PyPI

Before you install

Low friction installation with a single runtime dependency (typing_extensions). Active maintenance with a recent release 57 days ago and consistent commit activity; classifiers indicate production-stable status and support across Django 2.2 through 6.0.

Requires Python 3.9 or later; Django 2.2+ for full compatibility.

License in practice

MIT license permits commercial and private use with minimal restrictions; suitable for most projects without licensing concerns.

Quickstart

pip install django-environ

import environ
import os

env = environ.Env(DEBUG=(bool, False))
environ.Env.read_env('.env')
DEBUG = env('DEBUG')
DATABASES = {'default': env.db()}

Verify before relying

  • Performance characteristics when handling large numbers of environment variables or complex .env files
  • Specific behavior differences between Env and FileAwareEnv for Docker-style file-based secrets

Package facts

LicenseMIT permissive
Python supportSupports the current Python release <4,>=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
typing_extensions
MaintenanceActively maintained 57 days since the last release
Last repo commit
First released
Downloads8,557,519 / month, #1,606 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableFramework :: DjangoFramework :: Django :: 2.2Framework :: Django :: 3.0Framework :: Django :: 3.1Framework :: Django :: 3.2Framework :: Django :: 4.0Framework :: Django :: 4.1Framework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Evidence: django_environ-0.14.0-py3-none-any.whl

Tags

Capabilities
django environment variables configuration12factor django settings.env file djangoenvironment variable parsing djangodjango configuration managementdatabase url django configcache url django settings
Topics
django-configurationenvironment-variables12factor
PyPI keywords
environmentdjangovariables12factor

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “django environment variables configuration”

  • django-environLoads and parses environment variables from .env files to configure…
  • django-dotenvLoads environment variables from a .env file into Django's manage.py…
  • dj-database-urlParses DATABASE_URL environment variables into Django database…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also django-cache-url · django-constance · django-split-settings · python-decouple · envparse · dj-email-url · python-dotenv · dj-database-url · tempenv · django-decorator-include