harness-featureflags
Feature flag server SDK for python
What it is and what it does
This is the official Python SDK for integrating with Harness Feature Flags, a platform for managing feature toggles and A/B tests. The SDK connects to the Harness service, downloads flag definitions, and evaluates them locally based on target attributes and rules. It supports streaming updates so flag changes on the platform are reflected in real time without polling. The SDK handles caching, retry logic, and metrics reporting back to the platform.
You instantiate a client with an API key, create target objects representing users or entities, and call variation methods (bool_variation, int_variation, string_variation, etc.) to get the flag value for that target. The SDK applies rules, percentage rollouts, and custom targeting logic server-side and caches the results locally. It's designed for server-side use where you control the SDK lifecycle and have a persistent connection to the Harness backend.
Use it for:
- Roll out new features gradually to a percentage of users without redeploying code.
- Run A/B tests by serving different flag variations to different user segments based on custom attributes.
- Kill-switch critical features in production by toggling a flag without a code push.
- Manage feature access by role or organization using target attributes and flag rules.
- Experiment with performance-impacting changes by enabling them for a subset of targets first.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python SDK for evaluating and managing feature flags served by the Harness Feature Flags platform, with real-time flag state updates via streaming.
Yes, if you are using the Harness Feature Flags platform. The SDK is actively maintained, has low install friction, permissive licensing, and no known vulnerabilities. It is the canonical way to integrate Python applications with Harness flags. Not relevant if you use a different feature flag platform or manage flags in-process.
Install
harness-featureflags on PyPI
pip
pip install harness-featureflagsuv
uv add harness-featureflagspoetry
poetry add harness-featureflagsInstalling harness-featureflags
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with recent releases; last commit on 2026-08-03. Seven runtime dependencies (httpx, pyjwt, attrs, mmh3, requests, tenacity, typing-extensions) are all stable, widely-used libraries.
License in practice
Apache Software License 2.0 (permissive) allows commercial use, modification, and distribution with minimal restrictions—suitable for most production environments.
Quickstart
pip install harness-featureflags
from featureflags.client import CfClient
from featureflags.evaluations.auth_target import Target
client = CfClient(apiKey="your-api-key")
target = Target(identifier="user_1", name="User 1")
result = client.bool_variation("flag-name", target, False)
print(result)
Requires Python 3.5 or newer; Harness Feature Flags platform account and server SDK key to connect.
Verify before relying
- Performance characteristics under high-volume flag evaluations or large target populations.
- Behavior and fallback handling when the Harness platform is unreachable after retries exhausted.
- Thread-safety guarantees for concurrent flag evaluation calls.
Package facts
| License | Apache Software License 2.0 (permissive) |
| Python support | supports the current Python release (>=3.5) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — httpx, pyjwt, attrs, mmh3, requests, tenacity, typing-extensions |
| Maintenance | actively maintained — 127 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 400,366/month — #6,941 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: harness_featureflags-1.7.5-py2.py3-none-any.whl
Keywords: featureflags
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
UnleashClientA server-side Python SDK for integrating with…
permissive · top 5,000 on PyPI
statsigStatsig is a Python server SDK for managing…
permissive · top 5,000 on PyPI
yggdrasil-engineProvides Python bindings to the Unleash…
permissive · top 5,000 on PyPI
launchdarkly-server-sdkA server-side SDK for integrating…
permissive · top 5,000 on PyPI
django-waffleDjango Waffle provides feature flags (toggles)…
permissive · top 5,000 on PyPI
flagsmith-flag-engineEvaluates feature flags and remote…
permissive · top 5,000 on PyPI
django-flagsDjango-Flags provides a feature flag system for…
permissive · top 15,000 on PyPI
flagsmithFlagsmith is a Python SDK for managing feature…
permissive · top 5,000 on PyPI
openfeature-sdkOpenFeature Python SDK provides a…
permissive · top 5,000 on PyPI