Going Further: the Larz Stack
Larz is one library; the Larz Stack is 60+ more, all zero-dependency. See how the framework opts into them for exact money, double-entry books and PDF invoices.
You've built a money-native app with Larz. The framework is the assembly point for a whole family of standalone, zero-dependency libraries โ the Larz Stack โ and it opts into them through extras, so the core install stays dependency-free while power users get the batteries.
pip install larz # zero-dependency core, as always
pip install larz[money] # + larzmoney, larzledger, larzpdfReal invoices and balanced books
With the money extra, larz.contrib adds a PDF invoice generator and a double-entry ledger โ no hand-rolling either.
from larz.contrib import pdf, ledger
pdf.enable(app); ledger.enable(app)
@app.get('/invoice')
def invoice(req):
return app.invoice('INV-1',
items=[('Pro plan', 1, '99.00')], tax=0.08,
download='invoice.pdf') # a real PDF (larzpdf)
app.record_sale('Pro plan', '99.00') # Dr Cash / Cr Revenue (larzledger)
app.ledger.is_balanced() # always TrueTakeaways
- The core stays zero-dependency;
pip install larz[money|auth|ai|full]opts into the stack. app.invoice()returns a real PDF;app.ledgerkeeps double-entry books that always balance.- Learn the whole stack in the Larz Stack course, or browse it at larzos.com/stack.