Skip to main content

A feature toggle library designed after Java togglz

Project description

pygglz Written in Python PyPI Build Status codecov License

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.

Apache License, Version 2.0

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

pygglz-0.0.7.tar.gz (9.4 kB view hashes)

Uploaded Source

Built Distribution

pygglz-0.0.7-py3-none-any.whl (15.6 kB view hashes)

Uploaded Python 3

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