VWO OpenFeature Provider Python
Requirements
- Works with Python: 3.8+
Installation
It's recommended you use virtualenv to create isolated Python environments.
pip install vwo-openfeature-provider-python
Usage
from openfeature import api
from vwo_provider import VWOProvider
from openfeature.evaluation_context import EvaluationContext
from vwo import init
options = {
'sdk_key': '32-alpha-numeric-sdk-key', # SDK Key
'account_id': '123456' # VWO Account ID
}
# Initialize the VWO client
vwo_client = init(options)
# Initialize the VWO provider
vwo_provider = VWOProvider(vwo_client)
# Registering the default provider
api.set_provider(vwo_provider)
# A client bound to the default provider
default_client = api.get_client()
def start():
print('BOOL', default_client.get_boolean_value('unique_feature_key', False, EvaluationContext(attributes={'id': 'user_id', 'key': 'boolean_variable'})))
print('STRING', default_client.get_string_value('unique_feature_key', '', EvaluationContext(attributes={'id': 'user_id', 'key': 'string_variable'})))
print('INTEGER', default_client.get_integer_value('unique_feature_key', 10, EvaluationContext(attributes={'id': 'user_id', 'key': 'number_variable'})))
print('FLOAT', default_client.get_float_value('unique_feature_key', 10.0, EvaluationContext(attributes={'id': 'user_id', 'key': 'float_variable'})))
print('OBJECT', default_client.get_object_value('unique_feature_key', {}, EvaluationContext(attributes={'id': 'user_id', 'key': 'json-variable'})))
start()
Authors
Changelog
Refer CHANGELOG.md
Contributing
Please go through our contributing guidelines
Code of Conduct
License
Copyright 2024 Wingify Software Pvt. Ltd.
Metadata
Release files for vwo-openfeature-provider-python 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vwo_openfeature_provider_python-1.1.0.tar.gz | 8.7 kB | Without provenance | Details for vwo_openfeature_provider_python-1.1.0.tar.gz |
Release files / vwo_openfeature_provider_python-1.1.0.tar.gz
| Download URL | vwo_openfeature_provider_python-1.1.0.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
791c7d6fb89db6cd668cf16c8e1329bd251d8e2d81b091e21c2536554314f000
|
|
BLAKE2b-256 checksum How to use checksums |
0b37d743f5fc1fb968cd6e292d15e491b0522988cc4ffd14223f30c46cffbbf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.0
|
Security for vwo-openfeature-provider-python 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.