Tggl python client
Project description
Tggl Python Client
Install
Intall the package using the package manager of your choice:
pip install tggl
Quick Start
from tggl import TgglClient
client = TgglClient('<Your API key>')
flags = client.eval_context({
'user_id': 123,
'email': 'foo@gmail.com',
'plan': 'PRO'
})
# On/Off flags
if (flags.is_active('feature_1')):
print('Feature 1 is active')
# A/B tests
if (flags.get('feature_2') == 'Variation A'):
print('Should display variation A to user')
# A/B test with default value
if (flags.get('feature_2', 'Variation A') == 'Variation B'):
print('Should display variation B to user')
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
tggl-1.1.2.tar.gz
(1.9 kB
view hashes)