Larz documentation
Larz is a from-scratch, zero-dependency Python web framework where payments, paywalls, subscriptions and usage-metering are first-class primitives โ plus a full SaaS backend: auth, an ORM, an auto-admin panel, background jobs, and more.
pip install larz
Flask makes routes easy. Django makes data easy. Larz makes getting paid easy โ and gives you everything else you need to ship a product.
class=kw>from larz class=kw>import Larz
class=kw>import larz.money as money
app = Larz(secret="change-me")
money.enable(app) class=com># payments on. zero keys in dev.
@app.paid("$9/mo", trial_days=7) class=com># a subscription with a free trial
@app.get("/pro")
class=kw>def pro(req):
class=kw>return "<h1>Pro content</h1>"
app.run()
Learning path
New here? Follow these in order โ each builds on the last:
1. Install
Get Larz and run the demos.
2. Quickstart
Your first money-native app in 5 minutes.
3. Tutorial
Build a paid API end to end.
4. Money
Paywalls, metering, plans โ the core.
5. Data
The ORM: models, queries, relationships.
6. Auth
Users, login, API keys, roles.
What you can build
- Paid & metered APIs โ AI wrappers, data APIs billed per call โ see the tutorial
- Micro-SaaS โ a free tier + a Pro plan with a trial, a customer portal, and an admin
- Content paywalls โ reports, courses, paid newsletters
- Digital-product shops โ per-item pricing, instant delivery
Everything in Larz is pure Python standard library โ it runs anywhere
python3 runs, with nothing to pip install but Larz itself.