Quickstart
In this guide you install Lantern, write a few lines of code and run them. It takes about five minutes.
Install the package
pip install lanternWrite a few lines
Create a file called app.py and add:
from lantern import Client
flags = Client(source="flags.json")
if flags.is_enabled("new-checkout", user_id=user.id):
show_new_checkout()
else:
show_checkout()Run it
python app.pyRun it like any other script. Lantern logs only warnings and errors by default, so a quiet run is a good run.
Read next
- Installation: what you need, and how to install the package.
- Deploying: a short checklist before real traffic arrives.
- API docs: every function and option, with an example.