/simple-python-blockchain

Simple blockchain implemented in Python 3.6

Primary LanguagePythonMIT LicenseMIT

Simple Python Blockchain (SPB)

Simple blockchain implemented in Python 3.6 based off the code by Gerald Nash in Let’s Build the Tiniest Blockchain.

Run SPB

To run the code do the following:

  • Clone the repo: git clone git@github.com:rdempsey/simple-python-blockchain.git
  • Change into the project directory: cd simple-python-blockchain
  • Install the requirements: pip install -r requirements.txt
  • Make the main file executable: chmod +x bin/spb
  • View the help screen to see all the options: bin/spb -h
  • Run the app and have it generate 20 blocks: bin/spb spb INFO 20

Run the Tests

After you've performed all of the above steps you can run the tests with pytest and create a coverage report in html format. Run the following command in the root directory:

pytest --cov=spb spb/tests/ --cov-report html && open htmlcov/index.html