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 details)
Built Distribution
File details
Details for the file featureflagclient-0.2.tar.gz
.
File metadata
- Download URL: featureflagclient-0.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ae08280f9af1c15dd4a1cc9d198752a5855a19d6f7af592f0ebc69e3eccdd3b |
|
MD5 | b69c31a87d62856e3a550a7f8bb1b204 |
|
BLAKE2b-256 | 54e48172547b401f286dce4e1151746529dd39645e159e8af216257eb4451faf |
File details
Details for the file featureflagclient-0.2-py3-none-any.whl
.
File metadata
- Download URL: featureflagclient-0.2-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5ef8bb2826a0b8f7fadaf6461fa516e9e0f1d7811b6e6d310df00e5e8f17d08 |
|
MD5 | d3f6b444624c33160a10c406f253ef64 |
|
BLAKE2b-256 | fb0597e7b90b3d71980c3a1fb4fb6654b6782b2cde96bcbc67ede50d205a7dcc |