https://github.com/configcat/openfeature-python
ConfigCat OpenFeature Provider for Python.
https://github.com/configcat/openfeature-python
configcat feature-flag feature-flagging feature-toggle featureflags featuretoggles openfeature python remote-configuration
Last synced: 10 days ago
JSON representation
ConfigCat OpenFeature Provider for Python.
- Host: GitHub
- URL: https://github.com/configcat/openfeature-python
- Owner: configcat
- License: mit
- Created: 2024-08-07T16:08:04.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-12T00:22:43.000Z (7 months ago)
- Last Synced: 2025-08-12T02:31:15.148Z (7 months ago)
- Topics: configcat, feature-flag, feature-flagging, feature-toggle, featureflags, featuretoggles, openfeature, python, remote-configuration
- Language: Python
- Homepage: https://configcat.com/docs/sdk-reference/openfeature/python
- Size: 17.6 KB
- Stars: 3
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# ConfigCat OpenFeature Provider for Python
[](https://github.com/configcat/openfeature-python/actions/workflows/ci.yml)
[](https://pypi.python.org/pypi/configcat-openfeature-provider)
[](https://pypi.python.org/pypi/configcat-openfeature-provider)
This repository contains an OpenFeature provider that allows [ConfigCat](https://configcat.com) to be used with the [OpenFeature Python SDK](https://github.com/open-feature/python-sdk).
## Installation
```sh
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](https://github.com/configcat/python-sdk):
```python
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(
"",
# 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](https://configcat.com/docs/sdk-reference/python/#creating-the-configcat-client).
## Need help?
https://configcat.com/support
## Contributing
Contributions are welcome. For more info please read the [Contribution Guideline](CONTRIBUTING.md).
## 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.
- [Official ConfigCat SDKs for other platforms](https://github.com/configcat)
- [Documentation](https://configcat.com/docs)
- [Blog](https://configcat.com/blog)