growthbook
Powerful Feature flagging and A/B testing for Python apps
What it is and what it does
GrowthBook is a Python SDK for feature flagging and A/B testing that runs feature evaluation locally, eliminating the need for network calls on every check. It supports both synchronous and asynchronous code paths, making it suitable for traditional web frameworks like Django and Flask as well as async frameworks like FastAPI. The SDK fetches feature definitions from a remote GrowthBook API and caches them locally, allowing you to gate features, run experiments, and track results using your existing analytics system (GA, Segment, Mixpanel, or custom).
The package includes full type hints and is PEP 561 compliant, enabling IDE autocomplete and type checking with mypy. It handles user targeting, experiment assignment, and real-time feature updates via Server-Sent Events in the async client. The synchronous API is lightweight and requires minimal setup, while the async client is designed to be thread-safe and can be shared across concurrent requests in web applications.
Use it for:
- Gate new features behind flags in production without redeploying code, toggling them on/off remotely via the GrowthBook API.
- Run A/B tests by assigning users to experiment variations and tracking which variation they see through your analytics system.
- Implement progressive rollouts by targeting features to specific user segments (by ID, country, premium status, etc.) defined in user attributes.
- Integrate with FastAPI or other async frameworks to evaluate features per-request with real-time updates from the GrowthBook service.
- Use in Django or Flask middleware to attach a GrowthBook instance to each request and access feature state in views without extra setup.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
GrowthBook is a feature flagging and A/B testing SDK that evaluates feature flags and experiments locally without network requests, supporting both synchronous and asynchronous Python applications.
Yes. GrowthBook is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It solves a real problem (feature flagging and A/B testing) with both sync and async support, making it suitable for most Python web applications. The local evaluation model avoids network latency on every feature check, and the type hints provide good IDE support. Install it if you need feature flags or A/B testing; the only caveat is verifying whether the in-memory cache meets your deployment model (especially in multi-process scenarios).
Install
growthbook on PyPI
pip
pip install growthbookuv
uv add growthbookpoetry
poetry add growthbookInstalling growthbook
Before you install
Low friction: pure Python wheel with no compiled dependencies. Active maintenance with a recent release 57 days ago. Requires Python 3.7 or later; classifiers indicate support through Python 3.12.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install growthbook
from growthbook import GrowthBook
gb = GrowthBook(
attributes={"id": "user-123"},
api_host="https://cdn.growthbook.io",
client_key="sdk-abc123"
)
gb.load_features()
if gb.is_on("my-feature"):
print("Feature enabled")
Requires Python 3.7 or later; async client requires aiohttp for real-time feature updates via Server-Sent Events.
Verify before relying
- Whether the in-memory cache is suitable for multi-process deployments or if external cache backends are supported
- Performance characteristics and latency of local feature evaluation at scale
- Exact scope of the 100% test coverage claim and whether it includes edge cases
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — cryptography, typing_extensions, urllib3, dataclasses, async-generator, aiohttp, importlib-metadata |
| Maintenance | actively maintained — 57 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,075,976/month — #3,313 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: growthbook-2.3.1-py2.py3-none-any.whl
Keywords: growthbook
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
posthogPostHog Python SDK integrates product analytics…
permissive · top 1,000 on PyPI
amplitude-experimentProvides server-side A/B testing and feature…
permissive · top 15,000 on PyPI
openfeature-sdkOpenFeature Python SDK provides a…
permissive · top 5,000 on PyPI
optimizely-sdkProvides A/B testing, feature flagging, and…
permissive · top 15,000 on PyPI
eppo-server-sdkServer-side feature flagging and…
permissive · top 15,000 on PyPI
fastapi-lifespan-managerProvides a lifespan manager for FastAPI that…
permissive · top 15,000 on PyPI
statsigStatsig is a Python server SDK for managing…
permissive · top 5,000 on PyPI
LogbookLogbook is a logging library that replaces…
permissive · top 5,000 on PyPI
asgi-lifespanProgrammatically trigger ASGI application…
permissive · top 5,000 on PyPI
BeakerBeaker provides session management and caching…
permissive · top 15,000 on PyPI