Skip to main content

Simple Python blockchain implementation.

Project description

StupidBC

StupidBC is a simple Python implementation of a blockchain.

Installation

Use the package manager pip to install StupidBC.

pip install StupidBC

Usage

from blockchain import BlockChain

bc = BlockChain()

for i in range(10):
    new_block = blockchain.create_block(f"Lucas é um gostoso!")
    bc.mine(new_block)
    bc.add_block(new_block)

print(blockchain._chain)

Running Tests

In the terminal, run the following command

pytest

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Acknowledgments

  • Lucas Santos - Implemented a blockchain in typescript - khaosdoctor

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

StupidBlockChain-1.0.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

StupidBlockChain-1.0.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file StupidBlockChain-1.0.0.tar.gz.

File metadata

  • Download URL: StupidBlockChain-1.0.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.1

File hashes

Hashes for StupidBlockChain-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1971b947116be29e8f348093845e7bceeffcb83dcd375e0720005101ff7688c1
MD5 d3a31c09297a405328c36d21964c44a5
BLAKE2b-256 31334cdef0266491b1c03d7657a5cc3545a27f305570580daada9e57f7347d49

See more details on using hashes here.

File details

Details for the file StupidBlockChain-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for StupidBlockChain-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d7fed695b5356e445e4ff0948f3bb45a40d7162cb77d28926e652f23753e518
MD5 ddbc987865ff8025390f99bfbe425323
BLAKE2b-256 70a5d95e33df4cbb2c18e5508935256c47809e907e427422708dde4252f07735

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page