Registry / http-networking / launchdarkly-openfeature-server

launchdarkly-openfeature-server

JSON →
library0.5.1pypypi✓ verified 83d ago

An OpenFeature provider that bridges the LaunchDarkly Python server SDK with the OpenFeature API, enabling feature flag evaluation through the standard OpenFeature interface. Current version 0.5.1, requires Python <4.0,>=3.9. Pre-1.0 release with active development.

pip install launchdarkly-openfeature-server
INSTALL
IMPORT
SIG · LAUNCHDARKLY-OPENF
L
launchdarkly-openfeature-server
http-networkingpythonv0.5.1
Install
2.1s avg
Import
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.5.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 21.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.1s · import 0.000s · 22MB
20MB installed
● package 20MB
Code
Verified usage

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

LaunchDarklyProvider
from ld_openfeature import LaunchDarklyProvider
from launchdarkly_openfeature.server import LaunchDarklyProvider
Config
from ld_openfeature import Config

Simple example showing initialization and flag evaluation.

import os from ldclient import Config, LDClient from openfeature import api from openfeature.evaluation_context import EvaluationContext from launchdarkly_openfeature.server import LaunchDarklyProvider # Initialize LD client ld_config = Config(os.environ.get('LAUNCHDARKLY_SDK_KEY', '')) ld_client = LDClient(config=ld_config) # Set provider in OpenFeature api.set_provider(LaunchDarklyProvider(ld_client)) # Get OpenFeature client client = api.get_client() # Evaluate a flag targeting_key = 'user-key' ctx = EvaluationContext(targeting_key=targeting_key, attributes={'email': 'user@example.com'}) result = client.get_boolean_value('my-flag', default_value=False, evaluation_context=ctx) print(f'Flag value: {result}')
Debug
Known issues
breakingThe provider requires an initialized LDClient instance. Do not use ldclient.set_sdk_key() global initialization; the provider expects an explicit client.
fix
Instantiate LDClient with config and pass it to LaunchDarklyProvider.
affects: all
gotchaThe library is pre-1.0 (0.x.y). APIs may change without major version bump. Pin to exact version in production.
fix
Pin exact version in requirements: launchdarkly-openfeature-server==0.5.1
affects: all <1.0
deprecatedDo not use ldclient.get() global client. The provider expects an explicit LDClient instance.
fix
Create explicit LDClient and pass to provider.
affects: all
Upgrade
Version history
0.5.1latest on PyPI · released Nov 4, 2025
Audit
Dependencies
launchdarkly-server-sdkrequiredRequired for LD client configuration.
openfeature-sdkrequiredRequired for OpenFeature API.
Agent activity
27 hits · last 30 days
node
24
Amazon
1
OpenAI (training)
1
Resources
launchdarkly-openfeature-server — pip install launchdarkly-openfeature-server · libregistry