Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Python FF tutorial
# Clone the repo, move the files around and clean up the folder
git clone && mv flaskSaaS/*(DN) . && rm -rf flaskSaaS
# Setup and run the application
make install && make dev
python initdb
pip3 install -r requirements.txt
from featureflags.client import CfClient, Target
meta = {
"account": "<your account id here>",
"org": "default",
"environment": "PyCharm",
"project": "Python_FF"
api_key = "<your key>"
cf = CfClient(api_key)
ff_identifier = "guest"
ff_name = "guest"
target = Target(identifier=ff_identifier, name=ff_name, **meta)
except Exception as e:
flags["welcome_text"] = cf.string_variation("message", target, "test")
python runserver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment