Skip to main content

Service agnostic featureflag client

Project description

featureflagclient
=================

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

Features:

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

Created by `featureflag.tech`_.

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:

`featureflag.tech/node/exampleflag.json`_

You can access it like so

.. code-block:: python

from featureflagclient.client import Featureflagclient

f2c = Featureflagclient("https://featureflag.tech/node/exampleflag.json")

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:

.. code-block:: python

from featureflagclient.client import Featureflagclient

f2c = Featureflagclient(
"https://featureflag.tech/node/exampleflag.json",
{
"falseBoolean": req.param("falseBooleanOverride") or None
}
)

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

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

featureflagclient-0.2.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

featureflagclient-0.2-py3-none-any.whl (2.5 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