Skip to content

Commit

Permalink
Added examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
normoes committed Sep 26, 2018
1 parent feb93ef commit 12884f0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions examples/test_daemon_rpc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from monerorpc.authproxy import AuthServiceProxy, JSONRPCException
import logging
logging.basicConfig()
logging.getLogger("MoneroRPC").setLevel(logging.DEBUG)
log = logging.getLogger("wallet-rpc-lib")

rpc = AuthServiceProxy('http://test:[email protected]:18081/json_rpc')
#rpc = AuthServiceProxy('http://127.0.0.1:18081/json_rpc')
try:
rpc.get_info()
except (JSONRPCException) as e:
log.error(e)
12 changes: 12 additions & 0 deletions examples/test_rpc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from monerorpc.authproxy import AuthServiceProxy, JSONRPCException
import logging
logging.basicConfig()
logging.getLogger("MoneroRPC").setLevel(logging.DEBUG)
log = logging.getLogger("wallet-rpc-lib")

rpc = AuthServiceProxy('http://test:[email protected]:38083/json_rpc')
#rpc = AuthServiceProxy('http://127.0.0.1:38083/json_rpc')
try:
rpc.get_balance()
except (JSONRPCException) as e:
log.error(e)

0 comments on commit 12884f0

Please sign in to comment.