<p>There is <a href="https://github.com/jgarzik/python-bitcoinrpc" rel="nofollow noreferrer">python-bitcoinrpc</a>. Even though is not recent is completely valid. A list of all the available api calls is available <a href="https://bitcoincore.org/en/doc/22.0.0/rpc/" rel="nofollow noreferrer">here</a>. If you don't want to use this library you can connect to your bitcoin node with a library such as requests and make direct Http RPC calls. You can find more information about the RPC interface on the <a href="https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29" rel="nofollow noreferrer">wiki</a>.</p>

CC BY-SA 4.0
2022-02-03T22:55:47.600Z
2022-02-03T22:55:47.600Z
giacomocaironi
<p>Is there a good python library to connect to my locally running bitcoin node and query it? Such as view data block by block, txs, network difficulty at the time of each block, and other parameters? There is web3.py for Ethereum and other EVM based chains, but I couldn't find something similar which is up to date for Bitcoin.</p>

<bitcoind><json-rpc><client><bitcoin-cli><python>
Is there any web3.py equivalent for Bitcoin?
Rattle
# Is there any web3.py equivalent for Bitcoin?

(Asked by: username_0 on 2022-01-29)

Is there a good python library to connect to my locally running bitcoin node and query it? Such as view data block by block, txs, network difficulty at the time of each block, and other parameters? There is web3.py for Ethereum and other EVM based chains, but I couldn't find something similar which is up to date for Bitcoin.

**Tags:** bitcoind, json-rpc, client, bitcoin-cli, python


---

## 1 answers

### Answer by username_1 on 2022-02-03. Score: 0

There is [python-bitcoinrpc](https://github.com/jgarzik/python-bitcoinrpc). Even though is not recent is completely valid. A list of all the available api calls is available [here](https://bitcoincore.org/en/doc/22.0.0/rpc/). If you don't want to use this library you can connect to your bitcoin node with a library such as requests and make direct Http RPC calls. You can find more information about the RPC interface on the [wiki](https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29).


---

