Home Blog announcements
announcements

Introducing the Zenmanage Python SDK

The Zenmanage Python SDK brings feature flag management to Python applications with support for Django, Flask, and FastAPI, async evaluation, and ~1ms local flag checks.

The Zenmanage Python SDK makes it simple to add feature flags to your Python applications. With support for Django, Flask, and FastAPI — including full async support — plus percentage bucketing, context-based targeting, and ~1ms local evaluation, you can manage feature rollouts and configuration from a single package.
Python is the first server-side SDK in a series of language releases Zenmanage is shipping this quarter. If you have been managing flags through the REST API directly, or holding off until there was a native Python integration, this is it.
What is Zenmanage?
Zenmanage is a feature flagging platform built for the way modern teams ship. It separates deployment from release — you ship code to production behind a flag, then expose it to users when you are ready. Teams can manage boolean, string, and numeric flags across multiple environments, target users with rules and segments, run percentage rollouts, and track every change with a complete audit trail.
Why Python?
Python powers a wide range of production systems: Django monoliths, Flask microservices, FastAPI backends, data pipelines, and ML serving infrastructure. Feature flags are useful across all of them — for gating experiments, controlling rollouts in data-intensive pipelines, and managing configuration in API servers without redeployment. The Zenmanage Python SDK makes this native to the language rather than a workaround through the HTTP API.
Key features
Fast local evaluation
Flag rules are cached locally on your application, so evaluation resolves in ~1ms without an outbound HTTP call on every check. This matters in Django views and FastAPI route handlers where latency compounds quickly at scale.
Full async support
The SDK is built to work in both synchronous and asynchronous contexts. Django and Flask applications can use the synchronous client directly. FastAPI and other async frameworks work with the native async API — no thread hacks or sync wrappers needed.
Context-based targeting
Pass a context object with a user ID, plan, region, or any custom attribute you need. The SDK evaluates targeting rules locally and returns the correct flag value for that context. Works with all flag types: boolean, string, and numeric.
Percentage bucketing
Deterministic bucketing ensures the same context always lands in the same bucket. Roll out to 5% of users and those users stay in the rollout as you ramp to 50% and then 100% — no experience flickering, no bucket reassignment.
Graceful fallbacks
Every evaluation method accepts a default value. If the SDK cannot reach Zenmanage or the flag does not exist, your application gets the default and keeps running. No exceptions to catch, no silent null returns.
Getting started
Install from PyPI:
pip install zenmanage
Initialize the client and evaluate a flag:
from zenmanage import ZenmanageClient, Context

client = ZenmanageClient(api_key="tok_your_server_key_here")

context = Context(type="user", identifier="user-8291", attributes={"plan": "team"})
enabled = client.is_enabled("new-checkout", context=context, default=False)

if enabled:
    # show new checkout
    pass
For FastAPI and other async frameworks, use the async client:
from zenmanage.async_client import AsyncZenmanageClient, Context

client = AsyncZenmanageClient(api_key="tok_your_server_key_here")

@app.get("/flags")
async def flags(user_id: str):
    context = Context(type="user", identifier=user_id)
    enabled = await client.is_enabled("new-checkout", context=context, default=False)
    return {"new_checkout": enabled}
Django integration works with the synchronous client. Add your API key to settings and initialize the client once at startup — the same pattern you would use for any Django service object.
What's next
More server-side SDK releases are coming this quarter across Go, Java, Ruby, and others. Each follows the same pattern: a small, idiomatic client with local evaluation, context-based targeting, and deterministic bucketing. The Python SDK is available on PyPI now. The developer docs have the full quickstart and API reference.
Enjoyed this article?

Share it with your network.