โก Larz
The revenue-native Python web framework. Pricing, payments, metering, revenue analytics, dunning and referrals are built-in primitives โ and it is built to monetize AI apps too. Not a library you bolt on last.
GitHub ๐ด Live demo Read the docs Build a paid API
Flask makes routes easy. Django makes data easy. Larz makes getting paid easy.
A request to a paid route from someone who hasn't paid is automatically sent through
checkout; a metered API call with no credit gets a clean 402. You never
write if user.is_paid.
from larz import Larz
import larz.money as money
app = Larz(secret="change-me")
money.enable(app) # payments on, zero keys in dev
@app.paid("$9/mo", trial_days=7) # subscription with a free trial
@app.get("/pro/report")
def report(req):
return "<h1>Pro report</h1>"
@app.metered("$0.02/call") # per-call billing from prepaid credit
@app.post("/api/summarize")
def summarize(req):
return {"summary": run(req.json()["text"])}
app.run()
Batteries included, all pure standard library
๐ณ Money
@paid ยท @metered ยท @plan, subscriptions, trials, coupons, credit packs, and a revenue dashboard.
๐ Providers
Stripe, GemVault, Dodo, crypto โ via stdlib urllib, no SDKs. Add your own in ~40 lines.
๐งฑ Full stack
Template engine, tiny ORM, sessions, blueprints, static files, security middleware, SEO.
What it's for
Paid and metered APIs, content paywalls, micro-SaaS with a Pro tier, and digital products. See how it stacks up in Larz vs Flask vs Django.
Guides
Build a SaaS in Python
Accounts, billing, admin, deploy.
Monetize an API
Keys, metering, OpenAPI docs.
Add a paywall
One decorator, checkout included.
Subscription billing
Trials, renewals, a portal.
Metered billing
Pay-per-call APIs.
Stripe alternative
Self-hosted, provider-agnostic.
New to Python web development? Start at Larz Academy, then come back and ship something that charges money.