django-flags
Feature flags for Django projects
What it is and what it does
Django-Flags is a feature flag system that lets you control feature availability in Django applications without redeploying code. You define flags in Django settings or the admin interface and toggle them based on conditions—date ranges, specific users, URL parameters, or custom logic—to stage rollouts, run A/B tests, or gate experimental features.
The package integrates directly into Django's template system and Python code, so you can wrap features in conditional blocks that check flag state at runtime. Flags are editable through Django's admin interface, making it possible for non-developers to manage feature availability. It requires Python 3.10+ and Django 4.2+, and has no additional runtime dependencies beyond Django itself.
Use it for:
- Stage feature rollouts gradually to users by enabling a flag for a percentage of traffic or specific user groups.
- Run A/B tests by toggling different code paths for different user segments based on flag conditions.
- Disable problematic features in production without redeploying by flipping a flag in the admin interface.
- Test new functionality in production with a small set of users before full release.
- Manage time-limited features or promotions that activate on specific dates.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Django-Flags provides a feature flag system for Django projects, allowing you to toggle functionality on and off in code and templates based on configurable conditions like dates, users, or URL values.
Yes. Django-Flags is actively maintained, has no security vulnerabilities, minimal install friction, and solves a common need in Django projects. The permissive CC0-1.0 license removes any legal friction. Install it if you need runtime control over feature availability without redeployment.
Install
django-flags on PyPI
pip
pip install django-flagsuv
uv add django-flagspoetry
poetry add django-flagsInstalling django-flags
Before you install
Low install friction: pure Python wheel with only Django as a runtime dependency. Active maintenance with a recent release (185 days ago) and ongoing commits; supports current Python versions (3.10–3.13) and modern Django versions (4.2–6.0).
License in practice
Licensed under CC0-1.0 (public domain equivalent), which is permissive and imposes no restrictions on use, modification, or redistribution in your own projects.
Quickstart
pip install django-flags
# In settings.py, add to INSTALLED_APPS:
INSTALLED_APPS = [
...
'flags',
]
# In your view or template:
from flags.conditions import flag_enabled
if flag_enabled('my_feature'):
# Feature code here
pass
Requires Django 4.2+ and Python 3.10+; you must add 'flags' to INSTALLED_APPS for the app to function.
Package facts
| License | CC0-1.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — django |
| Maintenance | actively maintained — 185 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 309,132/month — #7,760 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_flags-5.2.0-py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
django-waffleDjango Waffle provides feature flags (toggles)…
permissive · top 5,000 on PyPI
FeatureManagementEnables runtime control of application features…
permissive · top 15,000 on PyPI
django-countriesProvides a Django model field for storing…
permissive · top 5,000 on PyPI
edx-togglesProvides Django-integrated feature toggle…
agpl · top 15,000 on PyPI
flagsmithFlagsmith is a Python SDK for managing feature…
permissive · top 5,000 on PyPI
django-bitfieldProvides a BitField model field for Django that…
unclear · top 15,000 on PyPI
UnleashClientA server-side Python SDK for integrating with…
permissive · top 5,000 on PyPI
django-admin-env-noticeAdds a colored banner to Django Admin to…
permissive · top 15,000 on PyPI
django-extensionsProvides a collection of custom management…
permissive · top 5,000 on PyPI
yggdrasil-engineProvides Python bindings to the Unleash…
permissive · top 5,000 on PyPI