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¶
- Name: tipfy.ext.jsonrpc
- Author: Maxim Lacrima, Rodrigo Moraes
- License: Apache Software License
- Tags: services, JSON-RPC
- URL: http://www.tipfy.org/wiki/extensions/jsonrpc/
- PyPi page: http://pypi.python.org/pypi/tipfy.ext.jsonrpc/
- Source code: http://code.google.com/p/tipfy-ext-jsonrpc/
- Issue tracker: http://code.google.com/p/tipfy-ext-jsonrpc/issues/list
- Version: latest
- Edited by moraes on 7/4/10 8:48 PM
- Save on Delicious | Submit to Reddit
- History
- Edit
