Created
May 1, 2011 18:50
-
-
Save joshmarshall/950731 to your computer and use it in GitHub Desktop.
JSONRPClib Console Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import jsonrpclib | |
>>> server = jsonrpclib.Server('http://localhost:8181') | |
>>> server.add(5, 6) | |
11 | |
>>> server._notify.add(5, 6) | |
>>> batch = jsonrpclib.MultiCall(server) | |
>>> batch.add(10, 17) | |
>>> batch.ping({'key':'value'}) | |
>>> batch._notify.add(50, 40) | |
>>> batch() | |
[27, {'key': 'value'}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment