python-monerorpc
Advanced tools
+21
-13
@@ -160,3 +160,5 @@ """ | ||
| return AuthServiceProxy( | ||
| service_url=self.__service_url, service_name=name, connection=self.__conn, | ||
| service_url=self.__service_url, | ||
| service_name=name, | ||
| connection=self.__conn, | ||
| ) | ||
@@ -196,13 +198,17 @@ | ||
| """Batch RPC call. | ||
| Pass array of arrays: [ [ "method", params... ], ... ] | ||
| Returns array of results. | ||
| Pass array of arrays: [ [ "method", params... ], ... ] | ||
| Returns array of results. | ||
| No real implementation of JSON RPC batch. | ||
| Only requesting every method one after another. | ||
| No real implementation of JSON RPC batch. | ||
| Only requesting every method one after another. | ||
| """ | ||
| results = list() | ||
| results = [] | ||
| for rpc_call in rpc_calls: | ||
| method = rpc_call.pop(0) | ||
| params = rpc_call.pop(0) if rpc_call else dict() | ||
| results.append(self.__getattr__(method)(params)) | ||
| params = rpc_call.pop(0) if rpc_call else {} | ||
| try: | ||
| results.append(self.__getattr__(method)(params)) | ||
| except (JSONRPCException) as e: | ||
| log.error(f"Error: '{str(e)}'.") | ||
| results.append(None) | ||
@@ -259,9 +265,11 @@ return results | ||
| if "error" in response and response.get("error", None) is None: | ||
| log.error(f"Error: '{response}'") | ||
| log.debug( | ||
| f"<-{response['id']}- {json.dumps(response['result'], default=EncodeDecimal)}" | ||
| ) | ||
| if "error" in response: | ||
| if response.get("error", None) is None: | ||
| log.debug( | ||
| f"<-{response['id']}- {json.dumps(response['result'], default=EncodeDecimal)}" | ||
| ) | ||
| else: | ||
| log.error(f"Error: '{response}'") | ||
| else: | ||
| log.debug(f"<-- {response}") | ||
| return response |
+2
-2
| Metadata-Version: 2.1 | ||
| Name: python-monerorpc | ||
| Version: 0.6.1 | ||
| Version: 0.6.2 | ||
| Summary: Enhanced version of python-jsonrpc for Monero (monerod, monero-wallet-rpc). | ||
@@ -11,3 +11,3 @@ Home-page: https://www.github.com/monero-ecosystem/python-monerorpc | ||
| License: UNKNOWN | ||
| Download-URL: https://github.com/monero-ecosystem/python-monerorpc/archive/v0.6.1.tar.gz | ||
| Download-URL: https://github.com/monero-ecosystem/python-monerorpc/archive/v0.6.2.tar.gz | ||
| Description: [](https://github.com/monero-ecosystem/python-monerorpc/releases) | ||
@@ -14,0 +14,0 @@ [](https://github.com/monero-ecosystem/python-monerorpc/tags) |
| Metadata-Version: 2.1 | ||
| Name: python-monerorpc | ||
| Version: 0.6.1 | ||
| Version: 0.6.2 | ||
| Summary: Enhanced version of python-jsonrpc for Monero (monerod, monero-wallet-rpc). | ||
@@ -11,3 +11,3 @@ Home-page: https://www.github.com/monero-ecosystem/python-monerorpc | ||
| License: UNKNOWN | ||
| Download-URL: https://github.com/monero-ecosystem/python-monerorpc/archive/v0.6.1.tar.gz | ||
| Download-URL: https://github.com/monero-ecosystem/python-monerorpc/archive/v0.6.2.tar.gz | ||
| Description: [](https://github.com/monero-ecosystem/python-monerorpc/releases) | ||
@@ -14,0 +14,0 @@ [](https://github.com/monero-ecosystem/python-monerorpc/tags) |
+1
-1
@@ -5,3 +5,3 @@ #!/usr/bin/env python | ||
| __version__ = "v0.6.1" | ||
| __version__ = "v0.6.2" | ||
@@ -8,0 +8,0 @@ setup( |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
46871
0.43%244
3.39%