Registry / devops / gofeatureflag-python-provider

gofeatureflag-python-provider

JSON →
library1.0.0pypypi✓ verified 83d ago

An OpenFeature provider for GO Feature Flag, enabling feature flag evaluation in Python applications. Version 1.0.0 supports OpenFeature 1.x and requires Python >=3.9. Released with monthly cadence.

pip install gofeatureflag-python-provider
INSTALL
IMPORT
SIG · GOFEATUREFLAG-PYTH
G
gofeatureflag-python-provider
devopspythonv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GoFeatureFlagProvider
from gofeatureflag_python_provider.provider import GoFeatureFlagProvider
from gofeatureflag_python_provider import GoFeatureFlagProvider
Provider class is in the provider submodule, not package root.

Initialize the GO Feature Flag provider, set it as the OpenFeature provider, and evaluate a boolean flag.

import os from openfeature import api from openfeature.evaluation_context import EvaluationContext from gofeatureflag_python_provider.provider import GoFeatureFlagProvider # Set endpoint via environment variable endpoint = os.environ.get('GOFEATUREFLAG_ENDPOINT', 'http://localhost:1031') provider = GoFeatureFlagProvider(endpoint=endpoint) api.set_provider(provider) client = api.get_client() # Evaluate a boolean flag targeting_key = "user-key" context = EvaluationContext(targeting_key=targeting_key, attributes={"email": "test@example.com"}) flag_value = client.get_boolean_value("my-feature-flag", default=False, evaluation_context=context) print(f"Flag value: {flag_value}")
Debug
Known issues
breakingProvider is not thread-safe: The GoFeatureFlagProvider currently uses a shared HTTP session that is not thread-safe. Avoid sharing a single provider instance across multiple threads without external synchronization.
fix
Create a new provider instance per thread or use a threading lock.
affects: <=1.0.0
deprecatedOpenFeature SDK v0.x incompatibility: This provider is designed for OpenFeature SDK v1.x. Using it with v0.x will cause import errors.
fix
Ensure openfeature-sdk is version 1.x.
affects: <=1.0.0
gotchaProvider requires explicit endpoint: The default endpoint is localhost:1031. If your GO Feature Flag relay proxy is elsewhere, you must set the endpoint explicitly via environment variable or constructor argument.
fix
Set the GOFEATUREFLAG_ENDPOINT environment variable or pass the endpoint argument.
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'GoFeatureFlagProvider' from 'gofeatureflag_python_provider'
Wrong import path: trying to import from package root instead of the provider submodule.
fix
Use: from gofeatureflag_python_provider.provider import GoFeatureFlagProvider
AttributeError: 'GoFeatureFlagProvider' object has no attribute 'initialize'
Using an older OpenFeature SDK (<1.0) where initialize is called differently.
fix
Upgrade openfeature-sdk to >=1.0 and use api.set_provider(provider) instead of provider.initialize().
Upgrade
Version history
1.0.0latest on PyPI · released Mar 31, 2026
Audit
Dependencies
openfeature-sdkrequiredRequired for the OpenFeature API
Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
gofeatureflag-python-provider — pip install gofeatureflag-python-provider · libregistry