edx-toggles
Library and utilities for feature toggles
What it is and what it does
edx-toggles is a Django library for managing feature toggles—runtime switches that control whether features are enabled or disabled without redeploying code. It integrates with django-waffle to store toggle state in the database, settings, or code annotations, and provides utilities for reporting on toggle status and lifecycle. The package is part of the Open edX ecosystem and is designed for applications that need to roll out features gradually, run A/B tests, or maintain feature flags for operational control.
The library exposes WaffleFlag and WaffleSwitch classes that you instantiate with a namespace and feature name, then call is_enabled() to check state at runtime. It also includes reporting scripts to audit all toggles in a codebase and extract their configuration. Recent versions dropped Python 3.8 support and added Django 5.2 compatibility, reflecting active maintenance for modern Django deployments.
Use it for:
- Gradually roll out new features to a subset of users by wrapping feature code in a toggle check.
- Run A/B tests by enabling a feature for specific user cohorts via waffle conditions.
- Disable problematic features in production without redeploying, using the admin interface or API.
- Audit and document all feature toggles in a codebase using the included reporting scripts.
- Manage deprecated features by toggling them off over time before removing code.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Django-integrated feature toggle management, allowing you to enable or disable application features at runtime through configuration, database, or settings without code changes.
Yes, if you are building a Django application and need runtime feature control. The package is actively maintained, has low install friction, integrates cleanly with django-waffle, and carries no known vulnerabilities. The AGPL 3.0 license is a hard requirement—only use it if your project is AGPL-compatible or deployed privately. For non-AGPL projects, you would need to evaluate alternative feature flag libraries.
Install
edx-toggles on PyPI
pip
pip install edx-togglesuv
uv add edx-togglespoetry
poetry add edx-togglesInstalling edx-toggles
Before you install
Low friction install with a pure Python wheel. Actively maintained as of August 2026, with recent releases and a current repository. Depends on Django and four edX-ecosystem packages (code-annotations, django-crum, django-waffle, edx-django-utils), all standard Django-adjacent libraries.
License in practice
Licensed under AGPL 3.0, which requires that any modifications or derivative works distributed must also be released under AGPL 3.0 and make source code available. This is a copyleft license; use it only if your project can comply with those terms or if you are using it unmodified in a private deployment.
Quickstart
pip install edx-toggles
from edx_toggles.toggles import WaffleFlag
my_feature = WaffleFlag('my_namespace', 'my_feature', module_name=__name__)
if my_feature.is_enabled():
# feature is active
Requires Django to be installed and configured; the module_name parameter is mandatory for WaffleFlag and WaffleSwitch constructors.
Verify before relying
- Exact minimum Django version requirement (classifiers show 4.2 and 5.2 support, but no lower bound stated).
- Whether Python 3.12 is the only supported version or if earlier 3.x versions are also supported.
- Performance characteristics when managing large numbers of toggles or in high-request-volume scenarios.
Package facts
| License | AGPL 3.0 (agpl) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — Django, code-annotations, django-crum, django-waffle, edx-django-utils |
| Maintenance | actively maintained — 129 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 79,284/month — #14,368 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: edx_toggles-6.0.0-py2.py3-none-any.whl
Keywords: Django, edx
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
edx-enterpriseA Django application that provides enterprise…
agpl · top 15,000 on PyPI
edx-django-release-utilProvides Django utilities and middleware for…
agpl · top 15,000 on PyPI
edx-django-utilsProvides a collection of shared utilities for…
permissive · top 15,000 on PyPI
django-flagsDjango-Flags provides a feature flag system for…
permissive · top 15,000 on PyPI
flagsmithFlagsmith is a Python SDK for managing feature…
permissive · top 5,000 on PyPI
edx-i18n-toolsCommand-line tool for extracting, compiling,…
permissive · top 15,000 on PyPI
sphinx-togglepromptAdds a button to Python code blocks in Sphinx…
permissive · top 15,000 on PyPI
sphinx-togglebuttonA Sphinx extension that adds collapsible toggle…
permissive · top 15,000 on PyPI
edx-drf-extensionsProvides JWT authentication, CSRF token…
permissive · top 15,000 on PyPI