Skip to main content

ConfigDirector OpenFeature Python Server Provider

CI PyPI

OpenFeature Python server provider for ConfigDirector, remote config and feature flags with typed values, JSON Schema validation, and safe renames of live flags. It wraps the ConfigDirector Python server SDK and requires Python 3.10 or newer.

Install

pip install configdirector-openfeature-server-provider

The OpenFeature Python SDK (openfeature-sdk) and the ConfigDirector Python server SDK come with it as dependencies.

Retrieve a value

from configdirector_openfeature import ConfigDirectorProvider
from openfeature import api

# The server SDK key is a secret. Do not commit it to your source code.
api.set_provider_and_wait(ConfigDirectorProvider("YOUR-SERVER-SDK-KEY"))
client = api.get_client()

new_checkout = client.get_boolean_value("new-checkout", False)

set_provider_and_wait needs openfeature-sdk 0.10 or newer. On an older version use api.set_provider, which waits for the provider to initialize there.

The provider accepts the same metadata, connection, logger, log_level, and telemetry options as the server SDK's create_client.

Evaluation context

The OpenFeature evaluation context maps onto the ConfigDirector context used by targeting rules:

OpenFeature ConfigDirector
targeting_key, or failing that an id attribute id
name attribute name
traits attribute, a mapping traits
anonymous attribute, a boolean anonymous
from openfeature.evaluation_context import EvaluationContext

context = EvaluationContext("user-123", {"name": "Ada", "traits": {"plan": "pro"}})
new_checkout = client.get_boolean_value("new-checkout", False, context)

Evaluation details

Outcome reason error_code
A value was evaluated TARGETING_MATCH, with the value's id as the variant
The config has no value DEFAULT
No config has that key ERROR FLAG_NOT_FOUND
The value does not match the requested type ERROR TYPE_MISMATCH
No config state has been received yet ERROR PROVIDER_NOT_READY

If the first config state does not arrive within the configured timeout, initialization still completes and evaluations return their defaults. The provider keeps connecting, and emits PROVIDER_READY once config state arrives. It emits PROVIDER_CONFIGURATION_CHANGED whenever configs are updated, with the keys the update carried followed by the keys a full update removed.

Test your code

Tests of code that reads flags through OpenFeature swap the provider for the in-memory one the OpenFeature Python SDK ships, InMemoryProvider, so the test controls the values and nothing from ConfigDirector is involved:

from openfeature import api
from openfeature.provider.in_memory_provider import InMemoryFlag, InMemoryProvider

api.set_provider_and_wait(InMemoryProvider({"new-checkout": InMemoryFlag("on", {"on": True, "off": False})}))
client = api.get_client()

assert client.get_boolean_value("new-checkout", False) is True

The provider copies its flags and has no method to change them, so a mid-test change sets a new provider. Shut OpenFeature down after each test with api.shutdown(). Full details are in the testing section of the official documentation.

Documentation

Refer to the official documentation for the OpenFeature Python provider.

There is also a quickstart guide for ConfigDirector and any of our SDKs.

Sample apps

samples/configdirector-openfeature-server-provider/ holds small, runnable applications built on this provider. Start with flask:

cd samples/configdirector-openfeature-server-provider/flask
uv run flask --app app run --port 3600

Getting Help

Metadata

Release files for configdirector-openfeature-server-provider 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for configdirector-openfeature-server-provider 1.3.0
File Size Uploaded
configdirector_openfeature_server_provider-1.3.0.tar.gz 7.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for configdirector-openfeature-server-provider 1.3.0
File Interpreter ABI Platform
configdirector_openfeature_server_provider-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.4 kB

Release files / configdirector_openfeature_server_provider-1.3.0.tar.gz

Download URL configdirector_openfeature_server_provider-1.3.0.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
626ef8a1764029b13065c0fced4ba985283c4689403405fe322551320e8dae20
BLAKE2b-256 checksum
How to use checksums
19435d61afbec4df313d2cbaef8788e90eac2a63d2d00dfee8909baff91f5c31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / configdirector_openfeature_server_provider-1.3.0-py3-none-any.whl

Download URL configdirector_openfeature_server_provider-1.3.0-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90027beb7754aa9d19cdfb53b09ac980c56db777f76d3ed5042814a2613b0d01
BLAKE2b-256 checksum
How to use checksums
d014deccc3b0637fff2e41f773c8912bf0bc168eb92e8d33f465611dd22a34fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release history Release notifications | RSS feed

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

This release

1.3.0 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page