Registry / devops / featuremanagement

featuremanagement

JSON →
library2.1.0pypypi✓ verified 87d ago

A Python library for enabling/disabling features at runtime, commonly used in .NET-style feature flag systems. Current version: 2.1.0. Released as needed, follows semantic versioning.

pip install featuremanagement
INSTALL
IMPORT
SIG · FEATUREMANAGEMENT
F
featuremanagement
devopspythonv2.1.0
Install
1.5s avg
Import
106ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.110s · 18.4MB
glibc
py 3.103.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")
Debug
Known issues
gotchaFeature flags dictionary must follow the correct schema: each flag must have an 'enabled' key (boolean) and optionally 'conditions'.
fix
Ensure your flag dictionary structure matches: {"FeatureName": {"enabled": True}}.
affects: >=2.0.0
gotchaThe library expects feature flags in a specific format when using Azure App Configuration; mismatched structure can cause silent failures.
fix
Use the Azure App Configuration provider to load flags automatically, or manually parse flags to match the expected schema.
affects: >=2.0.0
deprecatedThe method 'is_enabled' is stable but some older documentation refers to 'is_enabled' with a different signature (without the user context).
fix
Ensure you pass the correct arguments: is_enabled(feature_name, user_context=None).
affects: >=2.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'featuremanagement'
The library is not installed or the Python environment is incorrect.
fix
Run 'pip install featuremanagement' in the correct environment.
AttributeError: 'FeatureManager' object has no attribute 'is_enabled'
Typo or older version without 'is_enabled' method.
fix
Use 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.
fix
Ensure 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.
Agent activity
2 hits · last 30 days
node
2
Resources
featuremanagement — pip install featuremanagement · libregistry