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

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.

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

'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.

LibraryAnchored to
larzcryptRFC 8439/7748/8032 test vectors
larztotpRFC 6238 reference codes
larzqrThe QR spec's own ECC test vectors
larzicalRFC 5545 escaping + folding rules
larzbarcodeCheck 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/
๐ŸŽฏ
You can audit what you install. With a zero-dependency library, what you install is exactly what you read - one module, no tree. Run its tests, read its source, vendor it if you like. That auditability is the whole point of the stack.

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.

๐ŸŽ“ Final session complete

You've finished the Building with the Larz Stack sessions

Now lock it in with the coursework.

Do the assignments โ†’

Related lessons

More in this course

Course home → · Browse all courses →