Module Expr Str ImportFrom alias alias Import alias ImportFrom alias alias alias ImportFrom alias alias ClassDef bases NameLoad body Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults body TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr Return Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore ListLoad If Call NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad For NameStore NameLoad body Assign NameStore TupleLoad SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr Str ListLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr Str ListLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad If CompareNotEq Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr body Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListLoad For NameStore Call NameLoad Num Call NameLoad NameLoad body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad If Call NameLoad NameLoad body Continue Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If CompareNotIn Str Call AttributeLoad NameLoad attr body Assign NameStore Num TryExcept body Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad handlers ExceptHandler type NameLoad body Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body If CompareLt Call NameLoad NameLoad Num body Return Str Return SubscriptLoad NameLoad Index Num Return BinOpMod Str Call AttributeLoad Str attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad decorator_list If CompareEq NameLoad Str body Import alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Assign NameStore Call NameLoad NameLoad decorator_list Assign NameStore Num If CompareGt Call NameLoad AttributeLoad NameLoad attr Num body Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Print BinOpMod Str NameLoad Expr Call NameLoad NameLoad keyword NameLoad
N/A N/A 
============================
JSON-RPC Handler for Tornado
============================
This is a JSON-RPC server implementation, designed for use within the
Tornado framework. Usage is pretty simple:

>>> from tornadorpc.json import JSONRPCHandler
>>> from tornadorpc import start_server
>>>
>>> class handler(JSONRPCHandler):
>>> ... def add(self, x, y):
>>> ....... return x+y
>>>
>>> start_server(handler, port=8484)

It requires the jsonrpclib, which you can get from:

    http://github.com/joshmarshall/jsonrpclib

Also, you will need one of the following JSON modules:
* cjson
* simplejson

From Python 2.6 on, simplejson is included in the standard
distribution as the "json" module.
 tornadorpc.base BaseRPCParser BaseRPCHandler N/A jsonrpclib jsonrpclib.jsonrpc isbatch isnotification Fault jsonrpclib.jsonrpc dumps loads JSONRPCParser N/A BaseRPCParser N/A N/A content_type application/json-rpc parse_request N/A N/A self request_body N/A N/A N/A N/A N/A request N/A loads request_body N/A N/A N/A N/A N/A N/A self traceback N/A N/A N/A N/A self faults parse_error N/A N/A self _requests request N/A N/A self _batch False N/A request_list N/A N/A N/A isbatch request N/A N/A N/A self _batch True N/A req request N/A N/A req_tuple N/A N/A req N/A method N/A N/A req get params N/A N/A N/A N/A request_list append req_tuple N/A N/A N/A self _requests N/A request N/A N/A N/A request_list append N/A N/A request N/A method N/A N/A request get params N/A N/A N/A tuple request_list N/A parse_responses N/A N/A self responses N/A N/A N/A N/A isinstance responses Fault N/A N/A N/A dumps responses N/A N/A N/A len responses N/A len N/A self _requests N/A N/A N/A dumps N/A N/A N/A self faults internal_error N/A response_list N/A N/A i N/A range 0 N/A len responses N/A N/A request N/A N/A self _requests N/A i N/A response N/A responses N/A i N/A N/A isnotification request N/A N/A N/A rpcid N/A request N/A id N/A version N/A N/A jsonrpclib config version N/A N/A jsonrpc N/A N/A request keys N/A N/A version 1.0 N/A N/A N/A response_json N/A dumps response version version rpcid rpcid methodresponse True N/A N/A N/A TypeError N/A N/A N/A dumps N/A N/A N/A self faults server_error rpcid rpcid version version N/A N/A N/A response_list append response_json N/A N/A N/A self _batch N/A N/A N/A N/A len response_list 1 N/A N/A N/A N/A response_list N/A 0 N/A N/A [ %s ] N/A N/A ,  join response_list N/A N/A JSONRPCLibraryWrapper N/A object N/A N/A dumps dumps N/A loads loads N/A Fault Fault N/A JSONRPCHandler N/A BaseRPCHandler N/A N/A 
    Subclass this to add methods -- you can treat them
    just like normal methods, this handles the JSON formatting.
     N/A _RPC_ N/A JSONRPCParser JSONRPCLibraryWrapper N/A N/A N/A __name__ __main__ N/A N/A sys tornadorpc.base start_server tornadorpc.base TestRPCHandler TestJSONRPC N/A TestRPCHandler N/A N/A _RPC_ N/A JSONRPCParser JSONRPCLibraryWrapper N/A N/A port 8181 N/A N/A N/A len N/A sys argv 1 N/A N/A port N/A int N/A N/A sys argv N/A 1 N/A N/A Starting server on port %s port N/A N/A start_server TestJSONRPC port port