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
}
=================
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)
Built Distribution
Close
Hashes for featureflagclient-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5ef8bb2826a0b8f7fadaf6461fa516e9e0f1d7811b6e6d310df00e5e8f17d08 |
|
MD5 | d3f6b444624c33160a10c406f253ef64 |
|
BLAKE2b-256 | fb0597e7b90b3d71980c3a1fb4fb6654b6782b2cde96bcbc67ede50d205a7dcc |