--- id: harness-featureflags version: "1.7.5" license: Apache Software License 2.0 license_treatment: permissive maintenance: active --- # harness-featureflags — Feature flag server SDK for python License: permissive · Maintenance: active · Downloads: 400.4K/mo ## 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 above — 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 pip install harness-featureflags uv add harness-featureflags 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_current - Install friction: low - Maintenance: active - Downloads: 400.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags feature flag sdk python, harness feature flags client, feature toggle evaluation, remote feature flag management, flag variation server sdk, feature flag streaming updates, flag targeting and rules, feature-flags, harness-platform, a-b-testing [View on SkillFed](https://skillfed.io/packages/harness-featureflags) · [View on PyPI](https://pypi.org/project/harness-featureflags/)