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.6

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

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.6.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for spotify_confidence_sdk-0.2.6.tar.gz
Algorithm Hash digest
SHA256 a0818165de402032c459ac63db59cff77fc67a3210fdc62f2372d7051f903814
MD5 883ac1e7829da93ae2ddb65210f37f0c
BLAKE2b-256 d8e5ea1e677d1283f4f2a69ad01f932f765223a182538a54a4cadeb0fd6e0aec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spotify_confidence_sdk-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a1ed1dbcc87a199aa36f06d002a7cddc65b0881441fb8161c5e4d15387274cc5
MD5 4143b2ed36607fcd402ac3c2cfc4aa93
BLAKE2b-256 eeb895438e2796357584ec8db3ffc8e487da1be4185ad07d75626f6c397d0282

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