Skip to main content

Confidence provider for the OpenFeature SDK

Project description

Python Confidence SDK

Python library for Confidence.

Install

pip install

pip install spotify-confidence-sdk==0.2.5

#### requirements.txt
```python
spotify-confidence-sdk==0.2.5

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

spotify_confidence_sdk-0.2.5.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

spotify_confidence_sdk-0.2.5-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file spotify_confidence_sdk-0.2.5.tar.gz.

File metadata

File hashes

Hashes for spotify_confidence_sdk-0.2.5.tar.gz
Algorithm Hash digest
SHA256 b6ee4864a1d6235399a51227ad9d3a805dc64120974b089347409348be1a0c00
MD5 876d36fb50ff9507fd35d01e95fa3964
BLAKE2b-256 8e54e6ee6bdb89e310ac99426bab3fdf40ca9defc39cb8077f6c4dedb58c48de

See more details on using hashes here.

File details

Details for the file spotify_confidence_sdk-0.2.5-py3-none-any.whl.

File metadata

File hashes

Hashes for spotify_confidence_sdk-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bcfc9fb9f0db2b5678acf3e69a70495b530255bd60fcfc27950b8c0c9e2cb362
MD5 8940edbf70f104dd58d2f51550b62e25
BLAKE2b-256 c32f4fbd60dd37de012747ba10e99f3de4fec20d6a8e92aaea02185ffca806c4

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