skillfed

harness-featureflags

Feature flag server SDK for python

harness-featureflags v1.7.5 400.4K downloads/30d#6,941 on PyPI5
Permissive license Apache Software License 2.0 Active released

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-featureflags

uv

uv add harness-featureflags

poetry

poetry add harness-featureflags

Installing 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

Development Status :: 2 - Pre-AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8

Tags

feature flag sdk pythonharness feature flags clientfeature toggle evaluationremote feature flag managementflag variation server sdkfeature flag streaming updatesflag targeting and rules
feature-flagsharness-platforma-b-testing

More Software Development packages