--- id: django-flags version: "5.2.0" license: CC0-1.0 license_treatment: permissive maintenance: active --- # django-flags — Feature flags for Django projects License: permissive · Maintenance: active · Downloads: 309.1K/mo ## 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 above — 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 pip install django-flags uv add django-flags poetry add django-flags ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 309.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django feature flags, feature toggle django, conditional feature deployment, django a/b testing, django feature management, runtime feature control, django admin feature flags, feature-flags, django-middleware, a-b-testing [View on SkillFed](https://skillfed.io/packages/django-flags) · [View on PyPI](https://pypi.org/project/django-flags/)