aboutsummaryrefslogtreecommitdiff
path: root/jsonrpc
diff options
context:
space:
mode:
Diffstat (limited to 'jsonrpc')
-rw-r--r--jsonrpc/__init__.py2
-rw-r--r--jsonrpc/authproxy.py3
-rw-r--r--jsonrpc/json.py9
-rw-r--r--jsonrpc/proxy.py1
4 files changed, 15 insertions, 0 deletions
diff --git a/jsonrpc/__init__.py b/jsonrpc/__init__.py
new file mode 100644
index 0000000000..8441fa3120
--- /dev/null
+++ b/jsonrpc/__init__.py
@@ -0,0 +1,2 @@
+from .json import loads, dumps, JSONEncodeException, JSONDecodeException
+from jsonrpc.proxy import ServiceProxy, JSONRPCException
diff --git a/jsonrpc/authproxy.py b/jsonrpc/authproxy.py
new file mode 100644
index 0000000000..e90ef361d0
--- /dev/null
+++ b/jsonrpc/authproxy.py
@@ -0,0 +1,3 @@
+from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+
+__all__ = ['AuthServiceProxy', 'JSONRPCException']
diff --git a/jsonrpc/json.py b/jsonrpc/json.py
new file mode 100644
index 0000000000..95398630f7
--- /dev/null
+++ b/jsonrpc/json.py
@@ -0,0 +1,9 @@
+_json = __import__('json')
+loads = _json.loads
+dumps = _json.dumps
+if hasattr(_json, 'JSONEncodeException'):
+ JSONEncodeException = _json.JSONEncodeException
+ JSONDecodeException = _json.JSONDecodeException
+else:
+ JSONEncodeException = TypeError
+ JSONDecodeException = ValueError
diff --git a/jsonrpc/proxy.py b/jsonrpc/proxy.py
new file mode 100644
index 0000000000..0d2be1e93b
--- /dev/null
+++ b/jsonrpc/proxy.py
@@ -0,0 +1 @@
+from bitcoinrpc.authproxy import AuthServiceProxy as ServiceProxy, JSONRPCException