Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dvf/blockchain
A simple Blockchain in Python
https://github.com/dvf/blockchain
bitcoin blockchain cryptocurrency flask python
Last synced: 3 days ago
JSON representation
A simple Blockchain in Python
- Host: GitHub
- URL: https://github.com/dvf/blockchain
- Owner: dvf
- License: mit
- Created: 2017-09-24T19:36:36.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-07-21T21:35:02.000Z (5 months ago)
- Last Synced: 2024-11-25T20:04:10.362Z (17 days ago)
- Topics: bitcoin, blockchain, cryptocurrency, flask, python
- Language: C#
- Size: 124 KB
- Stars: 7,814
- Watchers: 414
- Forks: 2,752
- Open Issues: 123
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-blockchains - (Source) - - The fastest way to learn how Blockchains work is to build one (Do-It-Yourself (DIY) - Build Your Own Blockchain / Python)
- awesome - blockchain - A simple Blockchain in Python (C# #)
- awesome-blockchains - (Source) - - The fastest way to learn how Blockchains work is to build one (Do-It-Yourself (DIY) - Build Your Own Blockchain / Python)
- awesome-blockchains - (Source) - - The fastest way to learn how Blockchains work is to build one (Do-It-Yourself (DIY) - Build Your Own Blockchain / Python)
- StarryDivineSky - dvf/blockchain
README
# Are you looking for the source code for my book?
Please find it here: https://github.com/dvf/blockchain-book
The book is available on Amazon: https://www.amazon.com/Learn-Blockchain-Building-Understanding-Cryptocurrencies/dp/1484251709
# Learn Blockchains by Building One
[![Build Status](https://travis-ci.org/dvf/blockchain.svg?branch=master)](https://travis-ci.org/dvf/blockchain)
This is the source code for my post on [Building a Blockchain](https://medium.com/p/117428612f46).
## Installation
1. Make sure [Python 3.6+](https://www.python.org/downloads/) is installed.
2. Install [pipenv](https://github.com/kennethreitz/pipenv).```
$ pip install pipenv
```
3. Install requirements
```
$ pipenv install
```4. Run the server:
* `$ pipenv run python blockchain.py`
* `$ pipenv run python blockchain.py -p 5001`
* `$ pipenv run python blockchain.py --port 5002`
## DockerAnother option for running this blockchain program is to use Docker. Follow the instructions below to create a local Docker container:
1. Clone this repository
2. Build the docker container```
$ docker build -t blockchain .
```3. Run the container
```
$ docker run --rm -p 80:5000 blockchain
```4. To add more instances, vary the public port number before the colon:
```
$ docker run --rm -p 81:5000 blockchain
$ docker run --rm -p 82:5000 blockchain
$ docker run --rm -p 83:5000 blockchain
```## Installation (C# Implementation)
1. Install a free copy of Visual Studio IDE (Community Edition):
https://www.visualstudio.com/vs/2. Once installed, open the solution file (BlockChain.sln) using the File > Open > Project/Solution menu options within Visual Studio.
3. From within the "Solution Explorer", right click the BlockChain.Console project and select the "Set As Startup Project" option.
4. Click the "Start" button, or hit F5 to run. The program executes in a console window, and is controlled via HTTP with the same commands as the Python version.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.