.gitignore | ||
block.py | ||
blockchain.py | ||
blockchain_with_file.py | ||
example.py | ||
LICENSE | ||
mempool.py | ||
README.md | ||
tests.py | ||
written_blockchain.json |
PythonLocalBlockchain
When learning about blockchain, I decided to build my own local blockchain in Python, and add the ability to write to a file and verify the hashes. This is probably missing some (or many) of the things we need when building a functional blockchain, but it's purpose is to be able to see a small local blockchain in action with the command line.
Quick start
Run the file example.py
to build a blockchain from scratch with random values. It's really only there to be an interactive view on a blockchain, but the blockchain it creates will be destroyed when the program finishes, so there's no functionnality to it beyond exploration.
The file blockchain_with_file.py
however writes the blockchain to a file, and uses data that the user supplies. It could therefore even be used as a personal book keeping program for example.