root edited this page Jun 27, 2010 · 1 revision
  1. How to do JSONRPC with WebOp

an illustration of how you can do JSONRPC with WebOp, such that a pyjamas application will be able to talk to it. what's particularly good about this code is that the exact same code looks like it can be used for command-line test purposes as well as being run server-side (as a wsgi script).

comparing the code to for example, which is incredibly similar (but is only server-side) the disadvantage of the webop illustrated example appears to be that you are forced to declare a class containing the jsonrpc service operations. with the example shown on pyjamas-dev, you can add the decorator to a global function _or_ you can add the decorator to a function in a class.

(thanks to jim washington for finding this)