{"id":21209,"library":"edx-toggles","title":"edx-toggles","description":"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.","status":"active","version":"6.0.0","language":"python","source_language":"en","source_url":"https://github.com/openedx/edx-toggles","tags":["openedx","feature-toggles","waffle","django"],"install":[{"cmd":"pip install edx-toggles","lang":"bash","label":"pip install"}],"dependencies":[],"imports":[{"note":"WaffleFlag is in the toggles submodule, not top-level","wrong":"from edx_toggles import WaffleFlag","symbol":"WaffleFlag","correct":"from edx_toggles.toggles import WaffleFlag"},{"note":"Same as WaffleFlag, must use toggles submodule","wrong":"from edx_toggles import WaffleSwitch","symbol":"WaffleSwitch","correct":"from edx_toggles.toggles import WaffleSwitch"}],"quickstart":{"code":"from edx_toggles.toggles import WaffleFlag\n\nflag = WaffleFlag('myapp.my_flag', __name__, module_name=__name__)\nif flag.is_enabled():\n    print('Feature is enabled')\nelse:\n    print('Feature is disabled')","lang":"python","description":"Create and check a WaffleFlag."},"warnings":[{"fix":"Replace LegacyWaffleFlag with WaffleFlag and LegacyWaffleSwitch with WaffleSwitch.","message":"In version 5.0.0, the LegacyWaffleFlag, LegacyWaffleSwitch, and LegacyWaffleFlagCourseStaff classes were removed. Code using them must be migrated.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Update imports to use the new toggles module.","message":"The module `edx_toggles.waffle_utils` is deprecated. Use `edx_toggles.toggles` instead.","severity":"deprecated","affected_versions":">=5.1.0"},{"fix":"Always pass `module_name=__name__` when creating WaffleFlag.","message":"WaffleFlag requires a `module_name` argument to properly generate the cache key. Omitting it can cause incorrect toggle behavior.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `pip install edx-toggles`.","cause":"The package is not installed.","error":"ModuleNotFoundError: No module named 'edx_toggles'"},{"fix":"Use WaffleFlag instead. See migration guide.","cause":"LegacyWaffleFlag was removed in version 5.0.0.","error":"ImportError: cannot import name 'LegacyWaffleFlag' from 'edx_toggles.toggles'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}