High Performance Blockchain Deserializer
Reason this release was yanked:
macos universal py36 bad wheel
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
# This requires 5 GB memory.
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.2.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72080cd7a638812a3d3e7e781c0c0f53f58b2bbadb14dd71da429fed7d90d746 |
|
MD5 | 5316fda11bd1adae6b82fb77e25d661d |
|
BLAKE2b-256 | ef6272b115686eb5596f49fb7072e2f19dd45b818ad3c22be665f2135efb16e2 |
Hashes for bitcoin_explorer-1.2.5-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 446a619dcf017959d9da692b735d98b64a53fa176c652d3758ff66dca3b84c01 |
|
MD5 | 154fa739c0246913a0d9a178e7b23aeb |
|
BLAKE2b-256 | 74ac2ff07ea407089d61c9a44c2405806c750232acbfcb0d07b0e65785210752 |
Hashes for bitcoin_explorer-1.2.5-cp39-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d192ec61b76f98258646ec0511944cbd019e38b1648ccb424e565f9b0f0cfbf |
|
MD5 | f8d45704c38f78acab1be7abe96846b5 |
|
BLAKE2b-256 | fc510d89810c2c0039e3d5123faee886de853c2371da3f4c8b9f4d1624a589bd |
Hashes for bitcoin_explorer-1.2.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57582d061d7bb90e840f3f8890d903d6b15f663285c5efd984edc713add9253d |
|
MD5 | 5258aac3a4fb3befc76663ccf88b416e |
|
BLAKE2b-256 | ae7e34323e210904f4f040969f81a8eef7d0fe28245fdf3b46cfd60a80112152 |
Hashes for bitcoin_explorer-1.2.5-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d712fe7b45873567d6c870c1b2d2be841092d98b8b2175113c54ee18acd0788 |
|
MD5 | 212763584906ee3f2ff2f13f09ed592c |
|
BLAKE2b-256 | 3cb46e20d606323658529a83a1a1bb8d342101c146989c56625f85d95d580310 |
Hashes for bitcoin_explorer-1.2.5-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 565b9f9d85ed49ea7f1eaac4469f833aa37f5407601ad2879bc7b2a9cf50ec2f |
|
MD5 | b535e1e55d8cf1db925883e896be44b6 |
|
BLAKE2b-256 | 2885cfad40b616d4353f0f895646376ab18a312ff7a9675341dc48d55610a541 |
Hashes for bitcoin_explorer-1.2.5-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec4eb43c4906678bdcf42c4b47ebe5c1593388a79072cce97fcf862d248e361a |
|
MD5 | 89b2c889cf5ca3125c5c53709d37e5a5 |
|
BLAKE2b-256 | 79331271d5f56a4a32e49afd5a8f709386c54ab4d96f2433d3f15e86791dbd67 |
Hashes for bitcoin_explorer-1.2.5-cp38-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2120d1a21055e536e1ba684bcbff9e8dbcf00e498d6c940d3868a8e546dec2ec |
|
MD5 | b5b1e81269fbfa02505f447179c3c6cf |
|
BLAKE2b-256 | 808a0db15b1784f144616ffda6bdd726a7fbfd2256693f34928d3e70ad1bd7f9 |
Hashes for bitcoin_explorer-1.2.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cd7ae219a978bee2b21ac0e09a27212fa263eb5c8519a937907a4271002bb55 |
|
MD5 | d769fecafc4b41032f7c26389bfc9943 |
|
BLAKE2b-256 | 23193dea6220fd17af0f8fa96846ed9221597a2059ea55e8494098e4b817018c |
Hashes for bitcoin_explorer-1.2.5-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97e3d7e055a1e5e2dcaf9be9ccf6237d678b2945e97bca9cfb1c327eadfc3ea6 |
|
MD5 | 46d4976f965ab5b6715d13aff878e6b1 |
|
BLAKE2b-256 | b3fda4551b9f91c4249f405c828dbfc9d755071a1370ba0cc5255d531787d3cb |
Hashes for bitcoin_explorer-1.2.5-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d822a617938430e1a49160267071f3e3721a879fe0272dc66d96cb74b098351 |
|
MD5 | e27fbdc2adecdf4135310707753dc882 |
|
BLAKE2b-256 | 4cc30a3de5b75a151c8678407377459386fb715fcadb377bbe7d527f75857ca4 |
Hashes for bitcoin_explorer-1.2.5-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16b0021ecc83366b5e2f914f78a157983cee2210762d79a519e4d0f37f7b967a |
|
MD5 | 4b8b67eb25177b3b47b02069545819e3 |
|
BLAKE2b-256 | f8fcc9f625c8d8f7f2b3fc811e1ce8b27fd4ce5f4f9fa0b58d30511e79533958 |
Hashes for bitcoin_explorer-1.2.5-cp37-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6271e515572b45a02bebcf55fa5573c5bc48d8823a01377a8b8b4a4579adaec5 |
|
MD5 | eb05a2601d9ea5bd77f94f4b88390ab4 |
|
BLAKE2b-256 | 867f3d0faddb4862cfde9fff75dba3c03ee63577caecdf426079cca665835ea0 |
Hashes for bitcoin_explorer-1.2.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8855631198243700feecaeede698faac57dbb23e362d1e6edec9597038e74598 |
|
MD5 | 911978617b8c72855d2d22172c77e346 |
|
BLAKE2b-256 | b72db08b39c7a71fc989ae807d9d70c8cfe177c6743e2c4704fdd0d1159c20f2 |
Hashes for bitcoin_explorer-1.2.5-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5baa9737f7315a20c63cf671c3aef3cb542f31d5f8995683ffe2b9f5edee7493 |
|
MD5 | 321055c4f16548e10f8bc0138afac4c5 |
|
BLAKE2b-256 | 5066886e748a445cf114804c0cda3b4bf841dd33bba0daf694b8a1e5cb9cc569 |
Hashes for bitcoin_explorer-1.2.5-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc6fbb485717a6ed5f4822a8e1ffc7f923603de47b2199da0a70ed67ea99e2b4 |
|
MD5 | e54b4b623ca13547f4c4908da6c0933d |
|
BLAKE2b-256 | e6881db248400dfa2ee33e165a66ae1aa522f572aaf9e866e14415b933e652c5 |
Hashes for bitcoin_explorer-1.2.5-cp36-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fc657b44400c4627d758eac25ce04fc5258ece32025fbfa6223c8b2e0c3973d |
|
MD5 | 2287bc77220b2f6be56b28c144c32f83 |
|
BLAKE2b-256 | ff1f48e6787b61d8dd5052e45db76b0796f7bb664c971bf1715afbe010e4e08f |
Hashes for bitcoin_explorer-1.2.5-cp36-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7850063697f26c688ee64f0d829781010ad4dc936cdd2550049ff180799e4bc3 |
|
MD5 | db3840d2577bf5df528cb176f0e86caf |
|
BLAKE2b-256 | 60871b2fbbf39c0cf9e2b012f0348027cdae2e240be2411dc7c1e2370329a2e1 |
Hashes for bitcoin_explorer-1.2.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bce275fd1f04580634b4bc95efd7b510313fe730a5b03c5f10c71391b0136145 |
|
MD5 | f2ee16569055b74b43a05f83cfcd3fc2 |
|
BLAKE2b-256 | bb98af2f73a31e91a56f309289578176912efb0c2470ba1a4329f01e551e6bf1 |
Hashes for bitcoin_explorer-1.2.5-cp36-cp36m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9577751cfe9582470ea84e5cdefe05a6a3d198760b314b492390bc442e50985 |
|
MD5 | 603767c71a8facd6988d7c537447802a |
|
BLAKE2b-256 | 1eb025343d50a1f3670290fd8256be9598b8e3455caf32abc6f7d5dd0bd8e199 |
Hashes for bitcoin_explorer-1.2.5-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e8bd0d651a86a71a0e9b96a3cc078e87de2ef9ea6f54da93a16b786508c14a3 |
|
MD5 | 77729ffc1b6b1e694f1f7d2f7db8c1af |
|
BLAKE2b-256 | 9010c3d169d99a275c198ba47449616c678607ca55c58a520d3f1f7b170edb0c |