Skip to main content

ConfigCat OpenFeature Provider for Python

Project description

ConfigCat OpenFeature Provider for Python

CI PyPI PyPI

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?

https://configcat.com/support

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

configcat_openfeature_provider-1.0.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file configcat_openfeature_provider-1.0.0.tar.gz.

File metadata

File hashes

Hashes for configcat_openfeature_provider-1.0.0.tar.gz
Algorithm Hash digest
SHA256 904b96595e4ec825f75d32318b6c9c254fd63dc0cfcdafc00f82f8bcca2cc132
MD5 f0aa4873060fcf978a40e9455ee89f18
BLAKE2b-256 3574aea01ebdc1b5b856921163f11438ee7638182d290b0b29a08910d8fe8c4b

See more details on using hashes here.

File details

Details for the file configcat_openfeature_provider-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for configcat_openfeature_provider-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a694f92cccd91d26779e7605bb9d09948a90e3972863b965438de6bdc37958b3
MD5 f45f47efeac0022ea147de27248f03ab
BLAKE2b-256 b0cf6420a2aeae8daee1932ffabf070bbd4b6e4054627c4cb152190ea5bed33d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page