Registry / web-framework / edx-toggles

edx-toggles

JSON →
library6.0.0pypypi✓ verified 87d ago

Library and utilities for feature toggles in Open edX, built on top of Django Waffle. Current version 6.0.0. Release cadence: irregular, roughly quarterly.

pip install edx-toggles
INSTALL
IMPORT
SIG · EDX-TOGGLES
E
edx-toggles
web-frameworkpythonv6.0.0
Install
5.0s avg
Import
664ms
Disk
81MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v6.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.670s · 80.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 5.0s · import 0.658s · 82MB
81MB installed
● package 81MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WaffleFlag
from edx_toggles.toggles import WaffleFlag
from edx_toggles import WaffleFlag
WaffleFlag is in the toggles submodule, not top-level
WaffleSwitch
from edx_toggles.toggles import WaffleSwitch
from edx_toggles import WaffleSwitch
Same as WaffleFlag, must use toggles submodule

Create and check a WaffleFlag.

from edx_toggles.toggles import WaffleFlag flag = WaffleFlag('myapp.my_flag', __name__, module_name=__name__) if flag.is_enabled(): print('Feature is enabled') else: print('Feature is disabled')
Debug
Known issues
breakingIn version 5.0.0, the LegacyWaffleFlag, LegacyWaffleSwitch, and LegacyWaffleFlagCourseStaff classes were removed. Code using them must be migrated.
fix
Replace LegacyWaffleFlag with WaffleFlag and LegacyWaffleSwitch with WaffleSwitch.
affects: >=5.0.0
deprecatedThe module `edx_toggles.waffle_utils` is deprecated. Use `edx_toggles.toggles` instead.
fix
Update imports to use the new toggles module.
affects: >=5.1.0
gotchaWaffleFlag requires a `module_name` argument to properly generate the cache key. Omitting it can cause incorrect toggle behavior.
fix
Always pass `module_name=__name__` when creating WaffleFlag.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'edx_toggles'
The package is not installed.
fix
Run `pip install edx-toggles`.
ImportError: cannot import name 'LegacyWaffleFlag' from 'edx_toggles.toggles'
LegacyWaffleFlag was removed in version 5.0.0.
fix
Use WaffleFlag instead. See migration guide.
Upgrade
Version history
6.0.0latest on PyPI · released Apr 7, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
26
OpenAI (training)
1
Resources
edx-toggles — pip install edx-toggles · libregistry