๐Ÿงฑ
๐Ÿงฑ Building with the Larz Stack ยท STK-101 ยท Session 6 of 8

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.

โฑ 9 min read๐Ÿ“… Updated 2026-07-26๐Ÿ“Š Tables, charts & examples

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 areaBacked by stack libraryYou get
Money & billinglarzmoney + larzledger + larzsubscriptionExact money, books, subscriptions
Invoices & receiptslarzpdfReal PDF documents with exact totals
Auth & 2FAlarzcrypt + larztotp + larzqrHardened crypto, 2FA, enrollment QR
Jobs, cache, limitslarztask + larzcache + larzlimitBackground work, caching, rate limits
AI featureslarzagentTool-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 totals
๐ŸŽฏ
Best of both worlds. The framework's headline feature โ€” genuinely zero dependencies โ€” stays true for anyone who wants it. Opting into the stack is a deliberate choice that adds power, never a hidden tree of packages forced on every install.

A money-native app, end to end

Put the pieces together and a small amount of code becomes a real business backend.

FeatureStack + framework doing the work
Charge for a Pro planframework @paid + larzsubscription
Meter an API by the callframework @metered + larzmoney
Email a receipt PDFlarzpdf
Protect accounts with 2FAlarztotp + larzqr
Keep the bookslarzledger

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.

Session 6 of 8 complete

Next up: Communication & Formats โ€” Talking to the World

Continue to Session 7 โ†’

Related lessons

More in this course

Course home → · Browse all courses →