Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
B

blockchain

> 编程语言
Open source

A simple Blockchain in Python

8.0K stars0 likes1 views
WebsiteGitHub

About

A simple Blockchain in Python

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

This is the source code for my post on Building a Blockchain.

Installation

  1. Make sure Python 3.6+ is installed.
  2. Install pipenv.
$ pip install pipenv 
  1. Install requirements
$ pipenv install 
  1. Run the server:
    • $ pipenv run python blockchain.py
    • $ pipenv run python blockchain.py -p 5001
    • $ pipenv run python blockchain.py --port 5002

Docker

Another 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 .
  1. Run the container
$ docker run --rm -p 80:5000 blockchain
  1. 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.

Issues· 133 open

View all issuesOpen on GitHub
  • #259

    BDCCOIN

    Updated Sep 13, 2026
  • #256

    DELETE

    Updated Sep 12, 2026
  • #258

    BDCCOIN

    Updated Sep 6, 2026
  • #260

    BDCCOIN

    Updated Aug 26, 2026
  • #265

    Top Blockchain Consulting | Blockchain Development in Houston

    Updated May 21, 2026
  • #264

    works great

    Updated Aug 28, 2025
  • #166

    It’s beautiful job !I want know more by communicating with you

    Updated Aug 26, 2025
  • #233

    Blockchain

    Updated Aug 26, 2025
  • #263

    bdccoin_app_code.zip

    Updated Jul 27, 2025
  • #257

    HOW DOES BLOCKCHAIN WORKS?

    Updated Jun 20, 2025

> Tags

C#bitcoinblockchaincryptocurrencyflask

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言