<p>Maybe you miss how these libraries are implemented, in fact, the standard implementation of python JSON-RPC library already discover RPC function and map to python function, <a href="https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)#Python" rel="nofollow noreferrer">here</a> you can read the official wiki.</p>

<p>If you read the code of <a href="https://github.com/jgarzik/python-bitcoinrpc" rel="nofollow noreferrer">this library</a> you cannot find the specific implementation for every method, it's a generic wrapper around the implementation of JSON-RPC standard library.</p>

<p>The feature of this wrapper in detail are specified in <code>README.md</code> file.</p>

CC BY-SA 4.0
2018-05-17T11:23:19.883Z
2018-05-17T11:23:19.883Z
Mattia Rossi
<p>I've read about a few Python libraries that performs JSON-RPC calls to <code>bitcoind</code>. However, not many are actively developed/maintained, nor are they widely used in production environment. Since <code>bitcoind</code> evolves over time, these hard-coded Python functions may not work well with all the different versions of <code>bitcoid</code> -- some new functions are added while others may get deprecated.</p>

<p>And for any general purpose JSON-RPC library, we basically need to write all the wrappers of the function calls. It shouldn't be hard, but itself is another project.</p>

<p>I could've just use <code>bitcoin-cli</code> and let Python do <code>subprocess</code> calls, then the problem comes with parsing those <code>stdout</code>. Most of the time, they are just JSON format, except when they are not ...</p>

<p><strong>Question: can anyone recommend the best solution for Python program to interact with <code>bitcoind</code>?</strong></p>

<bitcoin-core><bitcoind><python>
need advice for Python interaction with bitcoin-core wallet
Will Gu
# need advice for Python interaction with bitcoin-core wallet

(Asked by: username_0 on 2018-04-12)

I've read about a few Python libraries that performs JSON-RPC calls to `bitcoind`. However, not many are actively developed/maintained, nor are they widely used in production environment. Since `bitcoind` evolves over time, these hard-coded Python functions may not work well with all the different versions of `bitcoid` -- some new functions are added while others may get deprecated.

And for any general purpose JSON-RPC library, we basically need to write all the wrappers of the function calls. It shouldn't be hard, but itself is another project.

I could've just use `bitcoin-cli` and let Python do `subprocess` calls, then the problem comes with parsing those `stdout`. Most of the time, they are just JSON format, except when they are not ...

**Question: can anyone recommend the best solution for Python program to interact with `bitcoind`?**

**Tags:** bitcoin-core, bitcoind, python


---

## 1 answers

### Answer by username_1 on 2018-05-17. Score: 2 | Accepted answer

Maybe you miss how these libraries are implemented, in fact, the standard implementation of python JSON-RPC library already discover RPC function and map to python function, [here](https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)#Python) you can read the official wiki.

If you read the code of [this library](https://github.com/jgarzik/python-bitcoinrpc) you cannot find the specific implementation for every method, it's a generic wrapper around the implementation of JSON-RPC standard library.

The feature of this wrapper in detail are specified in `README.md` file.


---

