Bitcoin Forum
June 26, 2024, 11:55:02 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Python-BitcoinRPC  (Read 691 times)
Nontenda (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 0


View Profile
April 24, 2013, 11:14:32 AM
 #1

Re-created on Development board which is better I think (but I can't delete this topic) :
https://bitcointalk.org/index.php?topic=186285.0


Hello Smiley

I'm trying to use the python library from jgarzik, https://github.com/jgarzik/python-bitcoinrpc

I've downloaded and run a python setup.py build / install but I cannot import authproxy.

It said that "no module name 'authproxy'" has been found.

What did I do wrong ?

Thank you very much,
Nontenda (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 0


View Profile
April 24, 2013, 12:23:16 PM
Last edit: April 24, 2013, 03:46:06 PM by Nontenda
 #2

Hi, thank's for your answer.

I only have one Python installed (3.0 CPython).

When I do a pip freeze, I got :
C:\Python33\Scripts>pip freeze
distribute==0.6.36
python-bitcoinrpc==0.1

EDIT FOUND :
Correct code is :

import bitcoinrpc.authproxy
import pprint

BITCOINRPC = 'http://user:pass@127.0.0.1:8332/'
pp = pprint.PrettyPrinter(indent=4)

bitcoin = bitcoinrpc.authproxy.AuthServiceProxy(BITCOINRPC)

data = bitcoin.getinfo()        # call bitcoin 'getinfo' RPC

But not working on Windows, don't know why. I'll try with PHP
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!