svgui/pyjs/jsonrpc/web2py/jsonrpc.py
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Mon, 21 Aug 2017 20:17:19 +0000
changeset 1729 31e63e25b4cc
parent 728 e0424e96e3fd
child 1736 7e61baa047f0
permissions -rw-r--r--
README.md edited online with Bitbucket
from pyjs.jsonrpc import JSONRPCServiceBase

class JSONRPCService(JSONRPCServiceBase):

    def serve(self):
        return self.process(request.body.read())

    def __call__(self,func):
        self.methods[func.__name__]=func
        return func