ConfigCat OpenFeature Provider for Python
Project description
ConfigCat OpenFeature Provider for Python
This repository contains an OpenFeature provider that allows ConfigCat to be used with the OpenFeature Python SDK.
Installation
pip install configcat-openfeature-provider
Usage
The ConfigCatProvider
constructor takes the SDK key and an optional ConfigCatOptions
argument containing the additional configuration options for the ConfigCat Python SDK:
from configcatclient import ConfigCatOptions, PollingMode
from openfeature import api
from configcat_openfeature_provider import ConfigCatProvider
# Configure the OpenFeature API with the ConfigCat provider.
api.set_provider(
ConfigCatProvider(
"<YOUR-CONFIGCAT-SDK-KEY>",
# Configure the ConfigCat SDK.
ConfigCatOptions(
polling_mode=PollingMode.auto_poll(60),
),
)
)
# Create a client.
client = api.get_client()
# Evaluate a feature flag.
is_awesome_feature_enabled = client.get_boolean_value("isAwesomeFeatureEnabled", False)
For more information about all the configuration options, see the Python SDK documentation.
Need help?
Contributing
Contributions are welcome. For more info please read the Contribution Guideline.
About ConfigCat
ConfigCat is a feature flag and configuration management service that lets you separate releases from deployments. You can turn your features ON/OFF using ConfigCat Dashboard even after they are deployed. ConfigCat lets you target specific groups of users based on region, email or any other custom user attribute.
ConfigCat is a hosted feature flag service. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file configcat_openfeature_provider-1.0.0.tar.gz
.
File metadata
- Download URL: configcat_openfeature_provider-1.0.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 904b96595e4ec825f75d32318b6c9c254fd63dc0cfcdafc00f82f8bcca2cc132 |
|
MD5 | f0aa4873060fcf978a40e9455ee89f18 |
|
BLAKE2b-256 | 3574aea01ebdc1b5b856921163f11438ee7638182d290b0b29a08910d8fe8c4b |
File details
Details for the file configcat_openfeature_provider-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: configcat_openfeature_provider-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a694f92cccd91d26779e7605bb9d09948a90e3972863b965438de6bdc37958b3 |
|
MD5 | f45f47efeac0022ea147de27248f03ab |
|
BLAKE2b-256 | b0cf6420a2aeae8daee1932ffabf070bbd4b6e4054627c4cb152190ea5bed33d |