Skip to content

Instantly share code, notes, and snippets.

@joshmarshall
Created May 1, 2011 18:50
Show Gist options
  • Save joshmarshall/950731 to your computer and use it in GitHub Desktop.
Save joshmarshall/950731 to your computer and use it in GitHub Desktop.
JSONRPClib Console Example
>>> 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