Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: tcatm on March 20, 2011, 10:19:37 PM



Title: very simple RPC client in python
Post by: tcatm on March 20, 2011, 10:19:37 PM
I found this (unfinished) code on my harddisk. It's basically a replacement for the built-in RPC client in bitcoind. host/port/user/pass is currently hardcoded.

http://pastebin.com/Nqhq1FUs


Title: Re: very simple RPC client in python
Post by: genjix on March 20, 2011, 11:03:26 PM
I got over-excited seeing the title.

How comes you made a wrapper for bitcoind? Seems a bit superfluous :p Thanks for sharing.

btw, I improved ServiceProxy. You should use my version, https://en.bitcoin.it/wiki/API_tutorial_%28JSON-RPC%29#Python


Title: Re: very simple RPC client in python
Post by: tcatm on March 20, 2011, 11:34:05 PM
Reasons I wrote this:
* works across network without bitcoind binary
* makes testing RPC features easy
* could be enhanced to pretty print listtransactions or listaccounts
* could support user confirmation on sendfrom ("Are you sure you want to send 1000 BTC to 1Hs53...? (y/N)")