Testing, Quality & Making It Your Own
Zero dependencies only pays off if the code is trustworthy. See how the stack proves its own correctness - and how you can verify, vendor, or extend any of it.
'Zero dependencies' is only an advantage if the code you're trusting is actually correct. A big part of the Larz Stack's design is provable correctness: rather than asking you to take its word, each library is anchored to something you can check - official test vectors, known constants, or round-trip properties. This session shows how that works, and how you can verify, vendor or extend any library yourself.
Proof, not promises
Each library is verified against something external and authoritative, so 'it works' is a checkable claim, not a hope.
| Library | Anchored to |
|---|---|
| larzcrypt | RFC 8439/7748/8032 test vectors |
| larztotp | RFC 6238 reference codes |
| larzqr | The QR spec's own ECC test vectors |
| larzical | RFC 5545 escaping + folding rules |
| larzbarcode | Check digits of known real codes |
Where a standard exists, the library reproduces its official answers exactly. Where one doesn't, it's anchored to round-trip properties (encode then decode returns the original) or known constants.
Verify and vendor it yourself
Because every library is pure standard-library Python with a full test suite, you can run the tests, read the whole thing, and even copy the module straight into your project - a level of control normal dependencies can't offer.
git clone https://github.com/larz-scripter/larzqr
cd larzqr && python -m unittest discover -s tests -v # run its proofs yourself
# or just vendor it - it's one dependency-free module:
cp larzqr/qr.py myproject/Extend and contribute
The libraries are small and readable by design, so adding a feature or fixing an edge case is approachable - and every repo is open-source (MIT) on GitHub.
๐ฏ Key takeaways
- Zero dependencies only helps if the code is trustworthy - the stack makes correctness provable, not just promised.
- Each library is anchored to RFC vectors, known constants, or round-trip properties you can check yourself.
- Because each is pure-Python and dependency-free, you can run its tests, read all of it, and vendor the module directly.
- The libraries are small and open-source (MIT) - approachable to extend or contribute to.
Frequently asked
How do I know a stack library is actually correct?
Run its tests - and note what they're anchored to. The security and format libraries are verified against official RFC test vectors (larzcrypt against RFC 8439/7748/8032, larztotp against RFC 6238, and so on), so they reproduce the standard's own published answers. Others use round-trip properties (encode then decode returns the input) or known constants. Because the code is small and dependency-free, you can also just read it end to end.
Can I use just part of a library, or modify it?
Yes - it's MIT-licensed and dependency-free, so you can vendor a single module into your project, trim it to what you need, or fork and extend it. There's no dependency tree to worry about breaking, and nothing external to keep in sync. Contributions back to the GitHub repos are welcome too.
You've finished the Building with the Larz Stack sessions
Now lock it in with the coursework.
Do the assignments โ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 StackSecurity & Identity โ Crypto You Can Trust
Security code is where 'roll your own' is scariest โ so this family sticks to standard, RFโฆ
Building with the Larz StackPutting It Together with the Larz Framework
The libraries shine alone โ but they were also designed to click into the Larz web framewoโฆ