A simple Blockchain implemented in Python
Go to file
Pavle Portic f75764b5a5
Refactor to fastapi
2020-03-15 22:14:31 +01:00
blockchain Refactor to fastapi 2020-03-15 22:14:31 +01:00
tests Preliminary Tests 2017-11-12 16:05:13 -05:00
.dockerignore Refactor to fastapi 2020-03-15 22:14:31 +01:00
.gitignore Added js blockchain class 2019-05-07 11:44:44 -04:00
Dockerfile Refactor to fastapi 2020-03-15 22:14:31 +01:00
LICENSE Initial commit 2017-09-24 15:36:36 -04:00
README.md Update readme 2020-02-04 15:57:33 +01:00
docker-compose.yml Refactor to fastapi 2020-03-15 22:14:31 +01:00
init Refactor to fastapi 2020-03-15 22:14:31 +01:00
poetry.lock Refactor to fastapi 2020-03-15 22:14:31 +01:00
pyproject.toml Refactor to fastapi 2020-03-15 22:14:31 +01:00
requirements.txt Refactor to fastapi 2020-03-15 22:14:31 +01:00
run.py Refactor and new features 2020-02-04 13:41:15 +01:00

README.md

Blockchain 101

Simple blockchain written in python

Installation

  1. Make sure Python 3.6+ is installed.
  2. Install poetry.
  3. Install requirements
$ poetry install
  1. Copy .env.example to .env

  2. Start some nodes:

    • $ poetry run flask run -p 5000
    • $ poetry run flask run -p 5001

Docker

Another option for running this blockchain program is to use Docker. Follow the instructions below to create a local Docker container:

  1. Build the docker image
$ docker-compose build
  1. Run the nodes
$ docker-compose up -d
  1. To add more nodes, add a new service to the docker-compose.yml file and adjust the port number.
node2:
	build: .
	ports:
		- 5002:80

Credits

dvf for the original blockchain code