bitcoinquery is a python package developed in rust
for accessing bitcoin-core binary files as a database.
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.
It contains one class BitcoinDB.
```python import bitcoinquery as bq
--datadir argument for bitcoind.db = bq.BitcoinDB("~/Bitcoin")
db.getmaxheight()
db.get_block(1000)
db.get_hash(1000)
db.getblockheader(1000)
db.getheightfrom_hash("some hash")
rayon parallel computing to take advantage of multicore)db.getblockbatch(list(range(100, 200)))
levelDB each time, thus it is relatively slow.db.get_transaction("some txid")
db.getheightfrom_txid("some txid")
db.parse_script("some hex script pubic key") ```
This is a PyO3 project. Use maturin to build and publish.
pip install maturin.