Python library for Confidence.
pip install spotify-confidence-sdk==1.0.1
spotify-confidence-sdk==1.0.1
pip install -r requirements.txt
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)
Events are emitted to the Confidence backend:
confidence.track("event_name", {
"field_1": False
})
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.