Larz › Zero-dependency FastAPI alternative
FastAPI ergonomics, zero dependencies, plus money built in
Love FastAPI's typed handlers and auto-docs, but want zero dependencies, built-in monetization, and a framework that never calls home? That's Larz.
pip install larz
What you keep from the FastAPI experience
- Typed validation from signatures — annotate parameters and dataclass bodies; bad input is a 422. (details)
- Dependency injection —
Depends(fn), cached per request. - Auto OpenAPI + a self-contained API explorer at
/docs. - Real-time — Server-Sent Events and streaming responses.
What Larz adds
- Zero dependencies — no Pydantic, no Starlette; just the standard library.
- Money-native — payments, subscriptions, metering, pricing, revenue analytics and even AI token billing are framework primitives, not add-ons.
- Runs on your infrastructure — no telemetry, no calls to any vendor server; your data stays in your database.
Trade-off, honestly: FastAPI is async and has a huge ecosystem; Larz is
synchronous (an async core is on the roadmap) and young. Choose Larz when zero-dependency,
monetization, and self-hosting matter more than raw async throughput.
FAQ
Is Larz a drop-in FastAPI replacement?
No — it's a different framework with similar ergonomics (typed handlers, DI, OpenAPI) plus built-in payments, at zero dependencies. It's synchronous today; an async core is planned.
Why choose Larz over FastAPI?
When you want zero dependencies, built-in monetization, and a framework that runs entirely on your own infrastructure with no telemetry. FastAPI is the better pick for async-heavy, high-concurrency APIs with a large ecosystem.