skillfed

django-constance

Django live settings with pluggable backends, including Redis.

django-constance v4.3.5 1.2M downloads/30d#4,205 on PyPI1,852
Permissive license BSD Active released

What it is and what it does

Django-constance is a Django app that moves application settings from static configuration files into dynamic, runtime-modifiable storage. Instead of hardcoding values in settings.py or environment variables, you define settings once and then change them through the Django admin interface or programmatically without restarting your application. It supports multiple backends: a built-in Django model backend that stores settings in the database, and Redis for higher-performance distributed scenarios.

The package integrates seamlessly with Django's admin interface, letting non-technical users or developers adjust application behavior on the fly. It's useful for feature flags, rate limits, feature toggles, or any configuration that benefits from runtime adjustment. With no external runtime dependencies and support for Django 4.2 through 5.2 on Python 3.8–3.13, it fits into existing Django projects with minimal friction.

Use it for:

  • Enable or disable features in production without redeploying by storing feature flags in django-constance and checking them at runtime.
  • Adjust application parameters like rate limits, timeouts, or batch sizes through the Django admin without code changes.
  • Store user-configurable settings (e.g., email templates, notification thresholds) in a database backend for non-developers to manage.
  • Share configuration across multiple application instances using Redis backend for consistency.
  • A/B test or gradually roll out changes by toggling settings on and off for different user cohorts.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Django-constance lets you store and manage application settings dynamically at runtime using pluggable backends like Redis or Django's database, with built-in Django admin integration for easy updates without redeployment.

Yes. Django-constance is actively maintained, has no external dependencies, carries a permissive BSD license, and solves a common Django problem cleanly. Use it when you need runtime-adjustable settings in a Django project. The Django model backend requires no extra infrastructure; add Redis only if you need distributed consistency across multiple app instances.

Install

django-constance on PyPI

pip

pip install django-constance

uv

uv add django-constance

poetry

poetry add django-constance

Installing django-constance

Before you install

Low install friction; no runtime dependencies. Actively maintained with recent commits and 1852 repository stars. Supports modern Django versions (4.2, 5.0, 5.1, 5.2) and Python 3.8–3.13.

License in practice

BSD license is permissive, allowing use in commercial and proprietary projects with minimal restrictions.

Quickstart

pip install django-constance

# In settings.py, add 'constance' to INSTALLED_APPS
# Then use:
from constance import config
value = config.MY_SETTING

Requires Django to be installed and configured; the package itself is a Django app and cannot function standalone.

Verify before relying

  • Whether Redis backend requires additional setup or if Django model backend is sufficient for most use cases.
  • Performance characteristics when managing large numbers of settings across distributed systems.

Package facts

License BSD (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 152 days since the last release
Last repo commit
First released
Downloads 1,217,790/month — #4,205 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django_constance-4.3.5-py3-none-any.whl

Keywords: django, libraries, redis, settings

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Utilities

Tags

django dynamic settingsdjango live configurationredis django settingsdjango admin settings managementpluggable django backendsruntime django configurationdjango settings without restart
django-appconfiguration-managementfeature-flags

More Utilities packages