Confidence provider for the OpenFeature SDK
Project description
Python Confidence SDK
Python library for Confidence.
Install
pip install
pip install spotify-confidence-sdk==1.0.0
#### requirements.txt
```python
spotify-confidence-sdk==1.0.0
pip install -r requirements.txt
Usage
Resolving flags
Flag values are evaluated remotely and returned to the application:
from confidence.confidence import Confidence
root_confidence = Confidence("CLIENT_TOKEN")
confidence = root_confidence.with_context({"user_id": "some-user-id"})
default_value = False
flag_details = confidence.resolve_boolean_details("flag-name.property-name", default_value)
print(flag_details)
Tracking events
Events are emitted to the Confidence backend:
confidence.track("event_name", {
"field_1": False
})
OpenFeature
The library includes a Provider
for
the OpenFeature Python SDK, that can be
used to resolve feature flag values from the Confidence platform.
To learn more about the basic concepts (flags, targeting key, evaluation contexts), the OpenFeature reference documentation can be useful.
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
Built Distribution
File details
Details for the file spotify_confidence_sdk-1.0.0.tar.gz
.
File metadata
- Download URL: spotify_confidence_sdk-1.0.0.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d183cb537512478a3ccaad7ba344c40ab4519d94e1b7b7bff9ac5f4a4c61e3e1 |
|
MD5 | 8d99b2860172794238933d1b7f6407fb |
|
BLAKE2b-256 | c70663c90020756dc695ba682a796d53e8644db9c9da9a2908c0f46e7252b8bc |
File details
Details for the file spotify_confidence_sdk-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: spotify_confidence_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 22.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24e7a50c21f043cd5b65cc520378fdcd4a6aab0617b1b94058d6d3490dd8dd4e |
|
MD5 | 6d3d4408273204cc9fb2908e7cfdd35e |
|
BLAKE2b-256 | 60ade42c5726e4078756d9904fc01b2bdee210be5d1059d6e98a33bf405c7262 |