Install & Compatibility
Where this runs
tested against v2.1.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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.110s · 18.4MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.102s · 19MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
FeatureManager
✓ from featuremanagement import FeatureManager
Import from featuremanagement directly, not from submodules.
FeatureFilterEvaluationContext
✓ from featuremanagement import FeatureFilterEvaluationContext
Correct import path.
Basic usage: create a FeatureManager with a dictionary of flags and check if a feature is enabled.
from featuremanagement import FeatureManager
# Initialize with in-memory feature flags
feature_manager = FeatureManager(feature_flags={
"Beta": {
"enabled": True
}
})
# Check if a feature is enabled
if feature_manager.is_enabled("Beta"):
print("Beta feature is enabled")
else:
print("Beta feature is disabled")
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'featuremanagement'
The library is not installed or the Python environment is incorrect.
fixRun 'pip install featuremanagement' in the correct environment.
AttributeError: 'FeatureManager' object has no attribute 'is_enabled'
Typo or older version without 'is_enabled' method.
fixUse FeatureManager from featuremanagement 2.0+, which includes 'is_enabled'. Check your installed version with 'pip show featuremanagement'.
ValueError: The feature flag configuration is invalid.
The flags dictionary passed to FeatureManager does not conform to the required schema.
fixEnsure each flag has an 'enabled' key with a boolean value. Optionally add 'conditions' with appropriate filters.
Upgrade
Version history
2.1.0latest on PyPI · released Apr 25, 2025
Audit
Dependencies
azure-appconfiguration-providerrequiredRequired for using Azure App Configuration as a feature flag provider.