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

What the Larz Stack Is (and Why Zero-Dependency)

Modern software drowns in dependencies โ€” hundreds of packages you never read, each a risk. The Larz Stack takes the opposite bet: 60+ focused libraries, each pure Python, each depending on nothing but the standard library.

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

Install almost any Python package today and you pull in a tree of dozens of others โ€” code you'll never audit, that can break, get abandoned, or be compromised. The Larz Stack is a deliberate rejection of that: a family of 60+ small, focused libraries that each depend on nothing but Python's standard library. No transitive dependency tree, no version conflicts, no supply-chain surface. Just readable Python you could vendor into any project.

๐Ÿ“Œ Worked example
The dependency tree you didn't choose. You pip-install one convenient package for a small feature. It quietly pulls in 24 others โ€” a date parser, three HTTP libraries, a C extension that needs a compiler, a package that was last updated four years ago. Months later one of them ships a breaking change and your build fails; another has a security advisory you now have to patch. With a zero-dependency library, what you installed is exactly what you read โ€” one file, no tree, nothing to surprise you later.

The zero-dependency bet

Every dependency is a loan against the future. The Larz Stack pays cash instead โ€” and it turns out you can go remarkably far on the standard library alone.

The usual wayThe Larz Stack way
Dozens of transitive dependenciesZero third-party dependencies
Version conflicts, dependency hellNothing to conflict โ€” stdlib only
Supply-chain risk you can't auditSmall, readable, auditable code
Heavy installs, slow cold startsTiny, fast, easy to vendor

This isn't purism for its own sake โ€” fewer moving parts genuinely means fewer things that break, less to secure, and code you can actually read end to end.

A whole toolbox, organised by job

The stack isn't one big library โ€” it's many small ones, each doing one thing well, grouped into families you'll meet over this course.

FamilyWhat it coversSessions
Money & paymentsExact money, ledgers, invoices, subscriptionsSession 2
Data & storageEmbedded DB, SQL builder, cache, formatsSession 3
Security & identityCrypto, secrets, 2FA, QR, DIDsSession 4
Web, AI & toolingHTTP, agents, CLI, logging, jobsSession 5
The frameworkHow the stack powers Larz appsSession 6

Pick only what a project needs โ€” each library stands alone, so you never carry weight you don't use.

How you use it

Every library installs and imports like any other package โ€” the difference is what doesn't come with it.

pip install larzmoney        # nothing else gets pulled in
pip install larzcrypt larzdb  # each is self-contained

from larzmoney import Money
price = Money("19.99", "USD")   # exact, never a float
๐ŸŽฏ
You could even skip pip. Because each library is pure standard-library Python with no dependencies, you can literally copy its module into your project and it works. That's a level of portability normal packages can't offer.

๐Ÿงฉ Do it with LarzOS

Turn this lesson into action with the exact free tools and AI workflows for the job:

๐ŸŽฏ Key takeaways

  • The Larz Stack is 60+ pure-Python libraries that each depend only on the standard library.
  • Zero dependencies means no dependency hell, no supply-chain tree to audit, and tiny, portable installs.
  • It's organised into families โ€” money, data, security, web/AI, tooling โ€” so you take only what you need.
  • Each library is self-contained enough that you can pip-install it or just vendor the module directly.

Frequently asked

Why avoid dependencies at all โ€” aren't libraries good?

Good libraries are great; the problem is the invisible tree behind them. A single install can pull in dozens of packages you never chose, each of which can break, be abandoned, or be compromised. Zero-dependency code removes that entire surface: what you install is what you read. It's a trade of a little convenience for a lot of control, security and longevity.

Is pure-Python not too slow?

For the vast majority of application code, no โ€” the bottleneck is almost always I/O (network, disk, database), not the language. The stack leans on the standard library's C-backed primitives (hashlib, json, sqlite3, struct) where it counts, and where a native fast-path exists (e.g. crypto) libraries can use it if present while still working without it. You reach for a C extension only in genuine hot loops, which most apps don't have.

Do I have to buy into the whole stack?

Not at all โ€” that's the point of many small libraries. Each one stands alone, so you can use just larzmoney in an otherwise-normal project, or combine a handful, or build an entire app on the stack plus the Larz framework. There's no all-or-nothing commitment.

Session 1 of 8 complete

Next up: Money & Payments โ€” Handling Money Correctly

Continue to Session 2 โ†’

Related lessons

More in this course

Course home → · Browse all courses →