High Performance Blockchain Deserializer
Reason this release was yanked:
bug: pyo3 logging deadlock
Project description
bitcoin-explorer
bitcoin_explorer
is an efficient library for reading
bitcoin-core binary blockchain file as a database (utilising multi-threading).
This package is ported using pyO3 from rust library bitcoin-explorer
Installation
MacOS, Windows, and Linux wheels are provided.
Use pip install bitcoin-explorer
to install.
Documentation
This library has a Rust version, go to Rust Documentation
For python documentation, go to Documentation.
Compatibility Note
This package deals with the binary file of another software Bitcoin Core
.
It might not be compatible with older Bitcoin Core versions.
Currently, it is compatible with Bitcoin Core version
Bitcoin Core version v0.21.1.0-g194b9b8792d9b0798fdb570b79fa51f1d1f5ebaf Copyright (C) 2009-2020 The Bitcoin Core developers
.
Examples
It contains one class BitcoinDB
.
import bitcoin_explorer as bex
# parse the same path as `--datadir` argument for `bitcoind`.
db = bex.BitcoinDB("~/Bitcoin")
# get the length of the longest chain currently on disk.
db.get_max_height()
# get block of a certain height
db.get_block(1000)
# to retrieve the connected outputs of each inputs as well.
# note that this is inefficient.
# Use `get_block_iter_range(end, connected=True)` for better performance.
db.get_block(1000, connected=True)
# get block hash of a certain height.
db.get_hash_from_height(1000)
# a fast method for getting just the header.
# in memory query, no disk access
db.get_block_header(1000)
# get block of height 1000.
db.get_height_from_hash("some hash")
# get transaction from txid.
# This queries the `levelDB` each time, thus it is relatively slow.
db.get_transaction("some txid")
# get the height of the block which this transaction belongs.
db.get_height_from_txid("some txid")
# get the script type and addresses from a script public key
db.parse_script("some hex script pubic key")
# use iterator
for block in db.get_block_iter_range(start=1000, end=2000):
do_something_with(block)
# use iterator, iterate over heights
for block in db.get_block_iter_array(heights=[1, 3, 5, 7, 9]):
do_something_with(block)
# use iterator, connect outpoints
for block in db.get_block_iter_range(end=700000, connected=True):
do_something_with(block)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for bitcoin_explorer-1.0.8-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13db30527dc15342b3e75e09f6f2d2c4b98263f26199b96189fbf7d9c2a20128 |
|
MD5 | 0a6b402f5efdcb5a1cc87bd2c7c3f10a |
|
BLAKE2b-256 | af42339b227d31b9b08adfb653d51b6cce84f98dc0a6b5a96e345f035b89df4c |
Hashes for bitcoin_explorer-1.0.8-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35e6033ed47fba70d1912488d9928f05c905db5d9fddd64f38b825e23129777b |
|
MD5 | 1e2268931b1f1a1ee4ab877138856998 |
|
BLAKE2b-256 | 7398dceda4f35113c0b3d9b796e59afff0c98d41e8756becc39bc50e2dd83463 |
Hashes for bitcoin_explorer-1.0.8-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c235ddc4031afffd660b1a63fb9f50fa9bb1e23edca2be6569450a6c6057c950 |
|
MD5 | 3b0bcb2433dd9626c7761f2d043dd77b |
|
BLAKE2b-256 | 3ef6007737aa01f2d214be28f01590f74644eade187515ac38cee7410a91187e |
Hashes for bitcoin_explorer-1.0.8-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5072d5d7d2e98752982be5ecf25b1a5fe0d8f13b02b78e26c31b99785bb2fed4 |
|
MD5 | 120385d8630e853828dd596b8366a036 |
|
BLAKE2b-256 | 62d8e5f8a17270854274e70e882b9bfbc7e9bcf1f1ac871dc17856bd663eb04a |
Hashes for bitcoin_explorer-1.0.8-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 555c2cc60ff6773f97945e11966475aa0b3ab53a0b4c301867b8f811592c16cc |
|
MD5 | a10c88e6942be73a166e20302aaf9c5a |
|
BLAKE2b-256 | 3041ebb5962aa86181ef4ddcba8e25368f4adf503fc299dd72698561826ef5f9 |
Hashes for bitcoin_explorer-1.0.8-cp39-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51a714ef61bb2eacbbc74d53ab9abaaecf89f05d6b86f3721fe4262323b749fd |
|
MD5 | b2d4f348ff7302ee4e82ebd6966f9e18 |
|
BLAKE2b-256 | a5a4929acabdf7fbfc5385d16fa29f789373de9ad7498a0d53e7ed1efa5f1e26 |
Hashes for bitcoin_explorer-1.0.8-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f81240701ebe46ab903f7b11d852325dfe67de7235002a8f4f489d83119b9cf0 |
|
MD5 | 8f3ea9f642eb3b787ff3260817547d6f |
|
BLAKE2b-256 | b06b1924c450ca54bc70d6173a09647086355cc4a75e748301825f3478754d70 |
Hashes for bitcoin_explorer-1.0.8-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7625ba09d989d84cfdf0caaee0853b585407175a4e462a792a747b3d8ea739ce |
|
MD5 | 4b09dd490009bdf23a3ec6ec4fb99b79 |
|
BLAKE2b-256 | a203aabe457d218d797a81c99bacfe1f17e76c8d58340c66dd145f050bbf19d2 |
Hashes for bitcoin_explorer-1.0.8-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6df4910dc3dda5f72a012624572f21f353fcf306415ea939d473780728a4bb8 |
|
MD5 | 1743e2f5784df09b4dd772e24423a49a |
|
BLAKE2b-256 | 07364143d4df8c183e57f2f0051618b10f5fee6ce8c73db76275ff21187b1e8e |
Hashes for bitcoin_explorer-1.0.8-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd74f5f03eb241084ff01d65179d3e4ccd820874c1043011956e1027f913a954 |
|
MD5 | 4f4ba6cf49d92540223a0eb3a5f7402f |
|
BLAKE2b-256 | f63c524764bd55ee4cd64b98d87a61452280c29daed58fc8c6935876f82b94cc |
Hashes for bitcoin_explorer-1.0.8-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b70c5264f330b347bf5b11f8a10eda4159f37d4be344f414d9e2810d577346ca |
|
MD5 | 31c78dec903c0c6ce701d950c0ce01f9 |
|
BLAKE2b-256 | fd5bb74b895b9c45427485a7cac99bb32c8251e43868b4c7c13bcb8b159d9a90 |
Hashes for bitcoin_explorer-1.0.8-cp38-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a71cb05259eec4a3bfe01613b1d108ab8f620bc389513ac85e92dd2ef1ba386b |
|
MD5 | 0a31959e4c704b63f42465849e4335d3 |
|
BLAKE2b-256 | 15c31be3c9919a792f959aeb0b4b92cc49bf51284036a4668d475caddea9a3aa |
Hashes for bitcoin_explorer-1.0.8-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 007b2c49c84e209b7253326da87f6e33924e7050c1d3814793229cd6b51480ad |
|
MD5 | 4f0fba4c18672b84b7b50696e8b8f882 |
|
BLAKE2b-256 | 65e4e1f473cde38e3f7de23a0f2c06f59087457b15c717c0f89d92066ccf7cbf |
Hashes for bitcoin_explorer-1.0.8-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d66e111f444ce1abb631520bd520924ff6792db556cc4d4856cba895356ea754 |
|
MD5 | 65f231380a52bff08cfd1625b22fb947 |
|
BLAKE2b-256 | de0e68f6e04cb90c8e75286a151b82deee0823fe13bbf624226b609bf5bd2081 |
Hashes for bitcoin_explorer-1.0.8-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a000c002224dca98326891b67c7852355a5ecc7ac3b7ce406c8ecc4668d20141 |
|
MD5 | dbd5075a834be88d87c51fd92cd9e96c |
|
BLAKE2b-256 | 32931f5446a1e087d4254f4c4d33dedcb2a3480b4b7b3dbbab44d5d9521a6a8b |
Hashes for bitcoin_explorer-1.0.8-cp37-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dae41b2f5eeaa2c86c4fabdb61868200dbfa14420143dd975b00f6542c48f67 |
|
MD5 | 9f5e00e9be720867360e745d04e136ad |
|
BLAKE2b-256 | 36f61af433cc0ecba605e62d18f4eea699b0032edcd5ba05935e630f0b28ef84 |
Hashes for bitcoin_explorer-1.0.8-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30ec948f7672a744242b8951b6a707ac99b98188709c3567a20921ce006e6b72 |
|
MD5 | 0c9e2fa2d00ed8d8a73c7466fc9dd670 |
|
BLAKE2b-256 | 99d132fd81e7c563fca8cb188bdb2da92b5ad6405059e49fe1090fb3e6cd158e |
Hashes for bitcoin_explorer-1.0.8-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb5d9f96b67ddab65dbc9da4d93afa0b1c33d3157f2ec5d0209a49848d47a3f4 |
|
MD5 | 9ac7f0c0c9324e837565177f371f948b |
|
BLAKE2b-256 | caa3c207c35a13dd67fbd5bd8435e7aa9d36d14616bef2f1c3a15962f656147d |
Hashes for bitcoin_explorer-1.0.8-cp36-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 053f240689f39400e152847c9b3fc59ae26c5ec5cebfcc3bca26c4b83d15aeb3 |
|
MD5 | 602838a9d70abb07bc850c18fbff0465 |
|
BLAKE2b-256 | c46e878ccae1ec90c7371c2531d65c64566baad50e3a8891160b6d9a980e2ef2 |
Hashes for bitcoin_explorer-1.0.8-cp36-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5445fe0814571887176e1c6214799986ff37f371948eb6422d032f9f980bd65 |
|
MD5 | f2007c7e83f99d3239638e963f6015bd |
|
BLAKE2b-256 | 6f646a701f9b1be621196249bd9f31d4cc91205bb368752922a2e2017e8dfa14 |
Hashes for bitcoin_explorer-1.0.8-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 573986feabe2f08ae3ec325a62dc28d39ee29cfb898992984c120a1d0e2ecce2 |
|
MD5 | 67d32c770cc78a480479d7bb85c97c53 |
|
BLAKE2b-256 | 4d2592f502133b5037719f2511228bd29d56c9c171ba33a5eeddd6da3d79d0f6 |
Hashes for bitcoin_explorer-1.0.8-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfdde37694b1f1f7577a1a91063157f809dcfca6f58d1016376c4ab9e718c236 |
|
MD5 | 1c94c0f8eacbf3bdf243b517879548eb |
|
BLAKE2b-256 | 268868c1c4a4842e9c58238fe742972aa85800a4b5659c4666bd2de754e08e31 |