Every time I looked at feature flag SaaS pricing, I had the same thought: I already run Redis. Why am I paying $500/month for a server I don't need?
Feature flags are not complicated. A flag is enabled or disabled. A user gets it or they don't. That's it.
So I built redis-feature-flags β a feature flag library backed by Redis you already run.
π° No new server β cut your infrastructure costs
π No data leaving your infrastructure β ever
π¦ No monthly bill β completely free
If you're already running Redis, you're 60 seconds away from production-ready feature flags.
What is redis-feature-flags?
A Python and Java SDK that turns your existing Redis instance into a feature flag system.
- Gradual rollout β release to 10% of users, then 50%, then 100%
- User targeting β give specific users early access
- Cohort targeting β target entire groups (beta testers, enterprise users)
- Kill switch β disable any feature instantly, no redeploy needed
- Flag expiry β auto-expire flags at a timestamp, no cleanup needed
- Multiple environments β prod, staging, dev on one Redis instance
- CLI included β manage flags from your terminal
Who is this for?
redis-feature-flags is ideal for:
- Startups and small teams who already run Redis and want to avoid adding new infrastructure
- Teams that are cost-conscious and want to eliminate SaaS subscriptions
- Developers who want full control over their data β no third party ever sees your flag evaluations
- Teams that value simplicity β no new service to deploy, monitor, or on-call for
If you already have Redis in your stack, this is a zero-overhead addition.
Get started in 60 seconds
pip install redis-feature-flags
import redis
from redis_feature_flags import FeatureFlags
r = redis.Redis()
flags = FeatureFlags(r, env="prod")
flags.create("dark_mode", rollout=10)
flags.enable("dark_mode")
flags.is_enabled("dark_mode", user_id="alice") # β True or False
That's it. No API keys. No account. No configuration files. Just Redis.
Works when Redis is down
The SDK has a three-tier cache design:
Warm cache β flag data served from in-process memory. No Redis call. Sub-millisecond.
Cold cache β flag data fetched fresh from Redis. Still fast.
Stale cache β if Redis goes down, the last known flag state keeps serving. Your application never crashes because Redis is temporarily unavailable.
Redis up β warm cache or fetch fresh from Redis
Redis down β serve stale cache (last known state)
Redis down + nothing cached β return default value
π Your flag data never leaves your infrastructure. Ever.
Well tested
- Python SDK β 94 tests, 100% coverage
- Python CLI β 68 tests, 95.83% coverage
- Java SDK β 109 tests passing
- E2e tests against real Redis β not mocks
- Benchmarked β warm cache evaluation under 0.1ms
CI runs on every commit across Python 3.9, 3.10, 3.11, 3.12, 3.13 and Java 17.
Manage flags from your terminal
The CLI works with any language SDK. Create a flag with the CLI, evaluate it in Python or Java.
pip install redis-flags
redis-flags use prod
redis-flags create dark_mode --rollout 10
redis-flags enable dark_mode
redis-flags list
redis-flags inspect dark_mode
The CLI auto-detects your OS username for audit trail. Every change is tracked.
Links
β GitHub: https://github.com/sgs-97/redis-feature-flags
π¦ Python SDK: https://pypi.org/project/redis-feature-flags
π₯οΈ CLI: https://pypi.org/project/redis-flags
β Java SDK: https://central.sonatype.com/artifact/io.github.sgs-97/redis-feature-flags
π Documentation: https://github.com/sgs-97/redis-feature-flags/blob/master/docs.md
π README: https://github.com/sgs-97/redis-feature-flags/blob/master/README.md
Contributions welcome. Especially TypeScript and Go SDKs.
Top comments (0)