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.1
requirements.txt
spotify-confidence-sdk==1.0.1
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.1.tar.gz
.
File metadata
- Download URL: spotify_confidence_sdk-1.0.1.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f0e89e5e6bf6bd1ab5cde7724eef37f891ac6922c13fe2ae5cb461b9eca94af |
|
MD5 | 68df31c20588cd2afac91bed715a21e2 |
|
BLAKE2b-256 | 1db16b7e8c2918f403b62f00062e14c8f952c4b6e8672c2664f92c6544017ca5 |
File details
Details for the file spotify_confidence_sdk-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: spotify_confidence_sdk-1.0.1-py3-none-any.whl
- Upload date:
- Size: 35.3 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 | 3365c91932022c030008b084949cbb8b3caadcb13b5d27dfefaf29b8ba9c5197 |
|
MD5 | d6dcaa324a5d1030d8cc049ea1157227 |
|
BLAKE2b-256 | e1be1bfb362dacd5d839020fc91da65bb3bfacf6136dde671ffbbdc1218b1a0b |