LarzChain › A blockchain in pure Python, zero dependencies
For developers

A blockchain in pure Python, zero dependencies

A whole blockchain โ€” keys, UTXO, proof-of-work, and a P2P network โ€” in readable, dependency-free Python.

โš ๏ธ Experimental testnet. LARZ is not an investment, has no promise of value, and may be worth nothing. There is no sale โ€” coins exist only by mining. Nothing here is financial advice.

Most "build a blockchain in Python" tutorials stop at a linked list of hashes. LarzChain is the real thing, built from first principles and zero dependencies โ€” you can read the whole thing.

What's in it

It's the same zero-dependency ethos as the Larz framework. Read how it works, or clone it and step through the code.

git clone https://github.com/larz-scripter/larzchain
cd larzchain
python3 -m larzchain wallet-new     # make an address
python3 -m larzchain node --mine    # run + mine on the testnet

FAQ

Is it really zero-dependency?

Yes โ€” the cryptography, the node, the networking, everything is the Python standard library. There is nothing to pip install.

Can I use this to learn how blockchains work?

That's a great use. It's small, readable and open source (MIT), and it implements the real mechanisms โ€” keys, UTXO, proof-of-work, and peer-to-peer consensus.

Is pure-Python secp256k1 fast?

No โ€” it's correct but slow, which is fine for a testnet. A native fast-path (coincurve) is a possible optional add later.

How it worksProof of workRun a nodeLarz framework