Python feature flag system: percentage rollout, user targeting, A/B testing, and kill switch. Ship fearlessly with instant rollback. Runs on Python 3.10+ stdlib only.
Boolean, percentage, and variant-based flags
User targeting by ID, email, plan, or custom attributes
Percentage rollout with consistent hashing (same user = same result)
Kill switch for instant feature disable
A/B testing with variant assignment and tracking
Flag lifecycle: created, active, stale, archived
JSON-based flag storage with hot reload
Evaluation audit log for debugging targeting rules
# Run feature flags demo
python src/main.py --demo
# Evaluate a flag for a user
python src/main.py --check dark_mode --user user123
# Roll out a feature to 25% of users
python src/main.py --set new_dashboard --rollout 25