bitchain
Simple Blockchain emulator in Python for educational purposes.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.9%) to scientific vocabulary
Keywords
Repository
Simple Blockchain emulator in Python for educational purposes.
Basic Info
- Host: GitHub
- Owner: block-foundation
- License: cc-by-sa-4.0
- Language: Python
- Default Branch: main
- Homepage: https://pypi.org/project/bitchain/
- Size: 54.7 KB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Bitchain
A Simple Blockchain Emulator in Python

Contents
Introduction
Bitchain is a simple lockchain emulator written in Python. Aimed at fostering education and understanding of blockchain technologies, Bitchain provides a clear and easy-to-understand interface to interact with a blockchain.
Key Features
- Block Creation: Easily create new blocks with customizable data.
- Transaction Handling: Simulate transactions between parties in the blockchain.
- Chain Validation: Verify the integrity of the blockchain through hash calculations.
- Persistence: Keep a record of transactions until they are incorporated into a block.
Installation
Requirements
- Python 3.6 or higher
- Git (optional)
To install Bitchain, clone the repository using Git:
sh
git clone https://github.com/username/bitchain.git
cd bitchain
or:
sh
pip install bitchain
see: https://pypi.org/project/bitchain/
You can also download the source code as a zip file and extract it.
Usage
Once you have the Bitchain code on your local machine, you can run it using Python:
sh
python3 main.py
Bitchain includes a main function that creates a simple blockchain, adds transactions to it, and prints out the entire chain.
Example
Here's a quick example of creating a blockchain, adding transactions, and creating new blocks:
``` python blockchain = Bitchain()
blockchain.newtransaction("Satoshi", "Mike", '5 BTC') blockchain.newtransaction("Mike", "Satoshi", '1 BTC') blockchain.newtransaction("Satoshi", "Hal Finney", '5 BTC') blockchain.newblock(12345)
blockchain.newtransaction("Mike", "Alice", '1 BTC') blockchain.newtransaction("Alice", "Bob", '0.5 BTC') blockchain.newtransaction("Bob", "Mike", '0.5 BTC') blockchain.newblock(6789)
print("Genesis block: ", blockchain.chain) ```
Building
py
python3 -m pip install --upgrade build
python3 -m build
Documentation
Please refer to the docstrings in the Bitchain class for detailed information on the functionality of each method.
Colophon
Authors
This is an open-source project by the Block Foundation.
The Block Foundation mission is enabling architects to take back initiative and contribute in solving the mismatch in housing through blockchain technology. Therefore the Block Foundation seeks to unschackle the traditional constraints and construct middle ground between rent and the rigidity of traditional mortgages.
website: www.blockfoundation.io
Development Resources
Contributing
We'd love for you to contribute and to make this project even better than it is today! Please refer to the contribution guidelines for information.
Legal Information
Copyright
Copyright © 2023 Stichting Block Foundation. All Rights Reserved.
License
Except as otherwise noted, the content in this repository is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) License, and code samples are licensed under the Apache 2.0 License.
Also see LICENSE and LICENSE-CODE.
Disclaimer
THIS SOFTWARE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
Owner
- Name: Block Foundation
- Login: block-foundation
- Kind: organization
- Email: info@blockfoundation.io
- Location: Netherlands
- Website: https://www.blockfoundation.io
- Repositories: 105
- Profile: https://github.com/block-foundation
The Block Foundation mission is enabling architects to take back initiative and contribute in solving the mismatch in housing through blockchain technology.
Citation (CITATION.cff)
cff-version: 1.2.0
title: "Bitchain: A Simple Blockchain Emulator in Python"
abstract: "This is a simple, yet powerful blockchain emulator written in Python for educational purposes."
version: 0.0.1
date-released: 2023-08-02
url: "https://github.com/block-foundation/bitchain"
repository-code: "https://github.com/block-foundation/bitchain"
repository-artifact: "https://github.com/block-foundation/bitchain/releases"
license: "Apache-2.0"
message: >-
If you use bitchain, please cite it using
the metadata from this file.
type: software
authors:
- given-names: Lars Bastiaan
family-names: van Vianen
email: lars@blockfoundation.io
affiliation: Block Foundation
orcid: "https://orcid.org/0000-0002-8790-8630"
keywords:
- Python
- Blockchain
- Emulator
- Education
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
- ubuntu 22.04 build