Log in

tipfy.ext.jsonrpc

This extension helps creating JSON-RPC services. It provides a RequestHandler mixin to easily set a JSON-RPC service based on lovely-jsonrpc.

Here's a very simple example of a service with a 'echo' method:

from tipfy import RequestHandler
from tipfy.ext.jsonrpc import JSONRPCMixin


class MyService(object):
    def echo(self, value):
        return value


class JsonHandler(RequestHandler, JSONRPCMixin):
    #: The service instance.
    jsonrpc_service = MyService()

    #: The service description.
    jsonrpc_name = 'JSONRPC Echo Service',
    jsonrpc_summary = 'This services echoes whatever it receives.'

Extension Reference


Powered by Moe. Yeah, the name is Moe. Powered by Google App Engine