A Simple Blockchain Database.
Project description
SimpleBlockchainDatabase
In this repository you can found a simple Database based on blockchain technology.
IN THIS MOMENT THE DATABASE JUST WORK AS LOCALLY AND ONE DEVICE
Version
1.1.0
LICENSE
Requirements
Python >= 3.6
Project structure
- Project root
- BlockchainDataBase
- Data
- _init_.py
- DBManage.py
- _init_.py
- Block.py
- Blockchain.py
- Data
- Test
- Test1.py
- Test2.py
- Test3.py
- Test4.py
- LICENSE
- README.md
- setup.py
- BlockchainDataBase
Test
- Test1.py, This test just creates the genesis block of the blockchain.
- Test2.py, This test add a one block to the blockchain and prints the blocks.
- Test3.py, This test add 2 blocks into the blockchain, prints the blocks and validate the blockchain.
- Test4.py, This shows all the blocks.
Install
From test.pypi.org
python -m pip install --index-url https://test.pypi.org/simple/ BlockchainDataBase
From official pypi.org
python -m pip install BlockchainDataBase
Examples
Initialize the Blockchain.
from BlockchainDataBase.Blockchain import Blockchain
bc = Blockchain()
Add one block into Blockchain.
data = {"Data": "dataResult"}
bc.add_block(data)
Shows all the blocks in the Blockchain.
bc.print_blocks()
Validates the blockchain to check if not was corrupted
bc.validate_chain()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for BlockchainDataBase-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1b1dd7382cb5daa0efe8a2b67604ffe59d6fbb48b61d83acf849eb6a8deb5c1 |
|
MD5 | 9de58e54c35d5e1b0ca52d6f6bc1ac20 |
|
BLAKE2b-256 | 58d722420618b3618ea4a8baa4fd2ab9e5b705ca2030346932a2869824c5f981 |