Putting It Together with the Larz Framework
The libraries shine alone โ but they were also designed to click into the Larz web framework, turning a pile of great parts into a whole money-native application.
Each stack library is useful on its own, but the real payoff is how they compose. The Larz web framework is the assembly point: it stays zero-dependency by default, and lets you opt into stack libraries as extras โ so installing the money extra lights up exact money, a ledger, and PDF invoices; the auth extra lights up hardened crypto and 2FA. You go from good parts to a coherent application.
The framework is the stack, assembled
The Larz framework was built first as a monolith; the stack is those same capabilities extracted into standalone, individually-tested libraries. Bring them back together and the framework gets stronger without losing its zero-dependency core.
| Framework area | Backed by stack library | You get |
|---|---|---|
| Money & billing | larzmoney + larzledger + larzsubscription | Exact money, books, subscriptions |
| Invoices & receipts | larzpdf | Real PDF documents with exact totals |
| Auth & 2FA | larzcrypt + larztotp + larzqr | Hardened crypto, 2FA, enrollment QR |
| Jobs, cache, limits | larztask + larzcache + larzlimit | Background work, caching, rate limits |
| AI features | larzagent | Tool-calling agents in your app |
The framework keeps a dependency-free core; each of these is an optional extra you turn on only if you want it.
Opt in without losing zero-dependency
The core installs with nothing. Extras pull in exactly the stack libraries that feature needs โ so power users get the batteries, and minimalists keep the clean install.
pip install larz # zero-dependency core, as always
pip install larz[full] # opt into the whole stack
pip install larz[money] # just the money libraries
# with the money extra installed:
app.invoice(customer, items) # a real PDF invoice, exact totalsA money-native app, end to end
Put the pieces together and a small amount of code becomes a real business backend.
| Feature | Stack + framework doing the work |
|---|---|
| Charge for a Pro plan | framework @paid + larzsubscription |
| Meter an API by the call | framework @metered + larzmoney |
| Email a receipt PDF | larzpdf |
| Protect accounts with 2FA | larztotp + larzqr |
| Keep the books | larzledger |
This is the whole arc of the course: exact money, safe data, trustworthy security and everyday tooling, assembled by the framework into something you can ship.
๐งฉ Do it with LarzOS
Turn this lesson into action with the exact free tools and AI workflows for the job:
๐ฏ Key takeaways
- The framework is the stack assembled โ the same capabilities, brought back together into a whole application.
- It stays zero-dependency by default; stack libraries are opt-in extras (pip install larz[full] or larz[money]).
- Opting in adds exact money, ledgers, PDF invoices, 2FA QR, jobs and AI โ never a forced dependency tree.
- Together, a small amount of code becomes a real money-native backend you can ship.
Frequently asked
Does using the stack break the framework's zero-dependency promise?
No โ that's the whole design. The framework core installs with zero dependencies and stays that way. The stack libraries are optional extras you explicitly opt into with pip (e.g. larz[money]), which light up richer features via adapter code that degrades gracefully if a library isn't installed. Minimalists keep the clean install; power users get the batteries. Nothing is forced.
Where should I start โ the stack or the framework?
Either works. If you have a specific need (exact money, a QR code, an embedded DB), grab that one library and use it in whatever project you're in. If you're building a whole money-native app, start with the framework and opt into stack extras as you need them. This course covered the libraries; the Larz framework course covers assembling them into an app.
Next up: Communication & Formats โ Talking to the World
Continue to Session 7 โRelated lessons
What the Larz Stack Is (and Why Zero-Dependency)
Modern software drowns in dependencies โ hundreds of packages you never read, each a risk.โฆ
Building with the Larz StackWeb, AI & Dev Tooling โ the Everyday Kit
The libraries you reach for constantly โ talking to the web, building AI agents, making CLโฆ