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.6-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f385dd85062ca2364d1c8ccd5c72f3c43f9b1403e2fe37f6db1f24e2f585db41 |
|
MD5 | 5d9aada67fd7fa1cb52a162998ebdea5 |
|
BLAKE2b-256 | 92f244f40e8a6979931e7f8f2736b51d76703ee5c698f22c4b808609ec9293f4 |
Hashes for bitcoin_explorer-1.2.6-cp310-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34c95844e329b0a058bb39ef1d4bb89f112a56687f3723301009e104a34d88ab |
|
MD5 | 0dd3387430698b46c998f0946e854087 |
|
BLAKE2b-256 | 40bf595a59ef5ddabcc9c42c9ad1435018c3880cce8ea51b77ced6a2cef373e6 |
Hashes for bitcoin_explorer-1.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fccd3d5bf89e32b325d9ec3abd1594cd45f1fc04439848e771355d1bddd669b |
|
MD5 | a428ac96e184e370fb3766898b36dcfd |
|
BLAKE2b-256 | 16a498c022c51ecee9c77d228d0c2898c51bf6f91fa59b7fe1132650312ec726 |
Hashes for bitcoin_explorer-1.2.6-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3540122314d7976d180f4758a6751cf4063a362edf214f57a4dc361c99d7b38 |
|
MD5 | 9a8034ea3dd7cb31ca5fd55a77f0eff3 |
|
BLAKE2b-256 | 12f08e3ed691b194a58ee3d99ff0378865351944276daa6227c6604d9cff0f36 |
Hashes for bitcoin_explorer-1.2.6-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aebeaa52bdba4469808587647a28065a2c08420f878c21ce5c5352e4e7a2a445 |
|
MD5 | fafd51d02d657a9dfef516821bcf907c |
|
BLAKE2b-256 | 551a83e4e2a5572cb9923271ebd2a47b9a0b4b1c84dfb5563078785db6c63cf8 |
Hashes for bitcoin_explorer-1.2.6-cp39-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b45e7b296c7cde62ade88da64fab64c7c4405464db90fd05a47c6fe6497aa24d |
|
MD5 | 953089547cc25c06c84e9c90976d6d3f |
|
BLAKE2b-256 | cc4e239933daf9eb21552e9511fabfe288a441deec541ff83be86369b2ec8de6 |
Hashes for bitcoin_explorer-1.2.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fc930703117ec63604c1db671c59418b83f5b6067d5348fbcf3d9210367134d |
|
MD5 | 8c4097c1730b16be251f956d489edcc3 |
|
BLAKE2b-256 | 97407dc5f660cc56fdace1a9f705b134fdad98835b025af7ac839d9e05440b69 |
Hashes for bitcoin_explorer-1.2.6-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88c57ea61687b75a178ef203dc48f7cd2a869597821d8a90f2338f441f063fec |
|
MD5 | aedb093922a3f231421899b3fb99b011 |
|
BLAKE2b-256 | 0a5f335eed91941e35e8bda90f2c972b5186dc8fb89d3f128daa33f226830d63 |
Hashes for bitcoin_explorer-1.2.6-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b43decf11bfc2f8901ade23a31669140244b0dce7ebb7992792a6e0b6b2ed65 |
|
MD5 | 03f328bc824aedd2ca014b3c024c89f4 |
|
BLAKE2b-256 | 8af0b9a736ed794ae13d8a3b3228c6faa818a34aa280e3e184dd0b12b5ab4305 |
Hashes for bitcoin_explorer-1.2.6-cp38-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 925c8d00459d8df929060adb08e1adac1f9af9f8e3bf5565e75357d9934e12db |
|
MD5 | b84f28e5b8b9430c55323021f77d4f06 |
|
BLAKE2b-256 | b30c78d6b9128aa62f9edba3ce45e542b33110954b09ae9e967c83e3905a4a89 |
Hashes for bitcoin_explorer-1.2.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee56108a8882992b1b31e7aaaf0fd3de6344d1b24876b19a41325fe7518f9f5e |
|
MD5 | 7f9926805385563dfa528ff00492941c |
|
BLAKE2b-256 | 8d3f57bf625a0ef5f723e7a50de5634915b717c5a8cce03e5575f96563981b03 |
Hashes for bitcoin_explorer-1.2.6-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbf09f3be07988e58e169e2c1b3060502c8d0ac2ff55a8371e4051d6ef9dade8 |
|
MD5 | 8146b3813fc6b600653514dbc24f296b |
|
BLAKE2b-256 | cef689ad6d7952e303d3d9c7b31a7afac9e8c07b883bebafc35795cfb1ea7a78 |
Hashes for bitcoin_explorer-1.2.6-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa0b248ed8fc2f41eb7e1b07481ac07af543535fadb8ff3725a6a57c0f8e5a01 |
|
MD5 | 33d3c4e837fef93e699877ce8a1f1b07 |
|
BLAKE2b-256 | a117e20ffdcaa62e92b09d1e2cd5212d02c2be2ee567a62dba628ae10bc623ec |
Hashes for bitcoin_explorer-1.2.6-cp37-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d741853c1861a5ea59e7a5e1f72c154f6b242b033771755963fbc7df7b97b080 |
|
MD5 | 1c113f6ee0dbcd271f72815ae3aa02e9 |
|
BLAKE2b-256 | c0aaf25c3d5637d66bf24d50337124068dd8e538593f66157ec19e6254e92db0 |
Hashes for bitcoin_explorer-1.2.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 115673ef5c3376961e0b9bfa53520a765d80137feefb1592864a1bf1ca34772f |
|
MD5 | 3da641ba7a692bfdf310e6f72eed1bd6 |
|
BLAKE2b-256 | 68796e0c2795e4b89936d4d0df4ab1e1cbf80d6af605702ad7254a8262a6e196 |
Hashes for bitcoin_explorer-1.2.6-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 603f02eb4f8bced4dee207b707e1d6bdc006e5e058b1bb062809afb9e9acf694 |
|
MD5 | 12d6f99c82ea615ca97f4f15eeee8fb0 |
|
BLAKE2b-256 | 2fc9f59f56bcafaeeb01fd4d1ad1de3937b2bb66a8f5eeb61378e815cc7f89ea |
Hashes for bitcoin_explorer-1.2.6-cp36-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d1948976a3ca7bef08eaad166721706564cc61139dce3a4f74b3cc51e31452f |
|
MD5 | f709dff409f2defa5036978f744defab |
|
BLAKE2b-256 | 50ca3b9a3e171ec3aa73ea11ff327acad996f732dbec7848d1b1905484592174 |
Hashes for bitcoin_explorer-1.2.6-cp36-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0701b0de84c26e8888ad6929b0a99cd86d160652ae38775197aad84e7e9802d5 |
|
MD5 | 2fea77b60f1c9ef00f3a03bf7d07adbe |
|
BLAKE2b-256 | 6b48905dc601876e02ad99bc3e5844e9b0747705d40effd85c95c2863962eea2 |
Hashes for bitcoin_explorer-1.2.6-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83eb5f487643981bb4e8a8484fef857ed058d1827dd4864acb0b010a3e625900 |
|
MD5 | fb5c9b03eb44f8eb38858321c075f520 |
|
BLAKE2b-256 | a02df7938dfdcc8efe56550e8c872ab0cf1be7358e7c833112b9de3f3769d4ed |
Hashes for bitcoin_explorer-1.2.6-cp36-cp36m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ff96c4d3fefe34cec88ac0b9217539b15f93b3a5246b2eb3c4c72ee78a80d1f |
|
MD5 | f686fbb866114bd6bfa80b8bf3bdbcf3 |
|
BLAKE2b-256 | 8b3dd81f1ac118b74038dbc7761cd3a3867cf29a167dfa187ded6827b1997aac |