larzledger
Double-entry accounting that always balances.
A double-entry ledger where every posting must balance, built on exact decimal money. Produces a trial balance and enforces the accounting equation so your books can't silently drift.
larzscript pkg install ledger
What you get
- Balanced double-entry postings
- Trial balance & accounting equation
- Exact decimal amounts
- Simple, auditable API
Try it
import "ledger" as ledger let books = ledger.new() ledger.post(books, "cash", "revenue", 10000, "sale #1") ledger.post(books, "expenses", "cash", 2000, "rent") print(ledger.balance(books, "cash")) print(ledger.is_balanced(books)) print(ledger.trial_balance(books))
Output
8000
true
{cash: 8000, expenses: 2000, revenue: -10000}Why it's in the Larz Stack
larzledger is a real Larzscript package (larzscript pkg install ledger) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.