pygglz
A feature toggle library designed after Java togglz
Features
- Global and thread local feature contexts
- Feature state snapshots
Storages for feature state
- File storage (json)
- DynamoDB table
- HTTP service
Installation
pip install pygglz
Usage
Features from local JSON file
from pygglz import features
from pygglz.file import FileRepository
...
pygglz.configure(state_repository=FileRepository("/home/app/.features.json"))
...
if features["ONE_CLICK_CHECKOUT"]:
...
Features from DynamoDB table "features"
from pygglz import features
from pygglz.dynamodb import DynamodbRepository
...
pygglz.configure(state_repository=DynamodbRepository())
...
if features["ONE_CLICK_CHECKOUT"]:
...
License
Copyright (c) 2020 by Cornelius Buschka.