Skip to main content

Service agnostic featureflag client

Project description


Allows you to use feature flags in your code, works with any JSON feature flag service.


  • Extremely light-weight.
  • Feature flag service agnostic.

Created by

Get started

You can install this via pip from the package index as

pip install featureflagclient

If you have a JSON file in the cloud like this one:

You can access it like so

from featureflagclient.client import Featureflagclient

f2c = Featureflagclient("")

if (f2c.get( "trueBoolean" )) {
	// do some python

A great way to use feature flags is to use the values from your flag source but override them in specific contexts. For example with a web application, you can have a feature disabled by default in your live production, but then override the value using a cookie or parameter in the request.

For example:

from featureflagclient.client import Featureflagclient

f2c = Featureflagclient(
		"falseBoolean": req.param("falseBooleanOverride") or None

if (f2c.get( "trueBoolean" )) {
	// do some python


Setting up from scratch

Project uses the following Python libs:

  • Python 3.6
  • pyenv for managing the version of Python
  • pipenv for managing dependencies and the Python env
  • pytest for unit testing
  • mypy for static typing (not yet true)
  • flake8 for code linting (not yet true)

pyenv - python version manager

brew install pyenv

Add this to .bash_profile

eval "$(pyenv init -)"

reload terminal session.

python 3.6.5

pyenv install 3.6.5

Setup env with dependencies

cd [repo directory]
pipenv install
pipenv shell

Run the tests

pytest -v

Release new version

  1. Bump the version number in

  2. Delete all the contents of the dist dir

  3. Create distribution files:

python sdist bdist_wheel
  1. Push to pypi:
twine upload dist/*
  1. Check the deployment at:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for featureflagclient, version 0.4
Filename, size File type Python version Upload date Hashes
Filename, size featureflagclient-0.4-py3-none-any.whl (3.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size featureflagclient-0.4.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page