skillfed

growthbook

Powerful Feature flagging and A/B testing for Python apps

growthbook v2.3.1 2.1M downloads/30d#3,313 on PyPI43
Permissive license MIT Active released

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 growthbook

uv

uv add growthbook

poetry

poetry add growthbook

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Typing :: Typed

Tags

feature flagging pythona/b testing sdklocal feature evaluationexperiment framework pythonremote configuration managementfeature flag clientasync feature flags
feature-flagsa-b-testingasync-ready

More Software Development packages