Module Expr Str ImportFrom alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ClassDef bases NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad decorator_list Assign NameStore Call NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot NameLoad body Assign NameStore Call NameLoad NameLoad Str If UnaryOpNot NameLoad body Assign NameStore Call NameLoad NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body If Call NameLoad NameLoad NameLoad body Return NameLoad orelse If Call NameLoad NameLoad Str body Return Call AttributeLoad NameLoad attr orelse If Call NameLoad NameLoad Str body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Return NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str TryExcept body For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr If UnaryOpNot Call NameLoad NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr If BoolOpOr Call AttributeLoad NameLoad attr Str CompareIs Call NameLoad NameLoad Str NameLoad NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListLoad Assign NameStore Dict If Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad orelse If CompareIn Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Assign NameStore NameLoad orelse Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr TryExcept body Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr TryExcept body Assign NameStore Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr If Call NameLoad NameLoad Str NameLoad body If CompareIsNot NameLoad NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr orelse Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str AugAssignSub AttributeStore NameLoad attr Num If CompareGt AttributeLoad NameLoad attr Num body Return If AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareNotIn Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str ListLoad body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Assign NameStore BinOpMod Str NameLoad If CompareGt Call NameLoad NameLoad Num body Assign NameStore BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad Assign NameStore SubscriptLoad BinOpMult Str Call NameLoad NameLoad Slice Num Assign NameStore BinOpAdd ListLoad NameLoad NameLoad NameLoad NameLoad If AttributeLoad NameLoad attr body If BoolOpAnd CompareGtE Call NameLoad NameLoad Num AttributeLoad NameLoad attr body Print Call AttributeLoad Str attr BinOpAdd SubscriptLoad NameLoad Slice Num Num SubscriptLoad NameLoad Slice Num orelse Print Call AttributeLoad Str attr NameLoad Return decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return TupleLoad ListLoad ListLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call AttributeLoad NameLoad attr Str body Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad NameLoad If Call NameLoad NameLoad Str NameLoad body Raise Call NameLoad Str Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Num Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr ListLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args NameParam NameParam defaults vararg body Expr Str If NameLoad body Assign NameStore BinOpAdd ListLoad NameLoad NameLoad orelse Assign NameStore NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If NameLoad body Assign AttributeStore NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Dict Str Str Str Str Str Num Num Num Num Num Assign NameStore Dict FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str If CompareIn NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse Assign NameStore Call AttributeLoad Str attr Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad NameLoad Return NameLoad decorator_list decorator_list Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str Num body Expr Str If CompareNotIn Call NameLoad NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore NameLoad Assign NameStore ListLoad TupleLoad NameLoad NameLoad If CompareNotEq NameLoad Str body Expr Call AttributeLoad NameLoad attr TupleLoad Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Str For TupleStore NameStore NameStore NameLoad body TryExcept body Expr Call NameLoad NameLoad Str NameLoad handlers ExceptHandler type NameLoad body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list Expr Str ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults Num body Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list NameLoad decorator_list ClassDef bases NameLoad body Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Return BinOpAdd NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Str decorator_list Assign NameStore Call NameLoad FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list NameLoad decorator_list
N/A N/A 
============================
Base RPC Handler for Tornado
============================
This is a basic server implementation, designed for use within the
Tornado framework. The classes in this library should not be used
directly, but rather though the XML or JSON RPC implementations.
You can use the utility functions like 'private' and 'start_server'.
 tornado.web RequestHandler N/A tornado.web N/A tornado.ioloop N/A tornado.httpserver N/A types N/A traceback tornadorpc.utils getcallargs Config N/A object N/A N/A verbose True N/A short_errors True N/A N/A config N/A Config BaseRPCParser N/A object N/A N/A 
    This class is responsible for managing the request, dispatch,
    and response formatting of the system. It is tied into the
    _RPC_ attribute of the BaseRPCHandler (or subclasses) and
    populated as necessary throughout the request. Use the
    .faults attribute to take advantage of the built-in error
    codes.
     N/A content_type text/plain __init__ N/A N/A self library encode decode N/A None None N/A N/A N/A self library library N/A N/A encode N/A N/A encode N/A getattr library dumps N/A N/A decode N/A N/A decode N/A getattr library loads N/A N/A self encode encode N/A N/A self decode decode N/A N/A self requests_in_progress 0 N/A N/A self responses N/A N/A faults N/A N/A self N/A N/A N/A N/A Faults self N/A property run N/A N/A self handler request_body N/A N/A N/A 
        This is the main loop -- it passes the request body to
        the parse_request method, and then takes the resulting
        method(s) and parameters and passes them to the appropriate
        method on the parent Handler class, then parses the response
        into text and returns it to the parent Handler to send back
        to the client.
         N/A N/A self handler handler N/A N/A N/A requests N/A N/A self parse_request 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 handler result N/A N/A N/A self faults parse_error N/A N/A N/A isinstance requests N/A types TupleType N/A N/A N/A isinstance requests basestring N/A N/A requests N/A N/A N/A hasattr requests response N/A N/A N/A N/A requests response N/A N/A N/A hasattr requests faultCode N/A N/A N/A N/A N/A self handler result requests N/A N/A requests N/A N/A N/A self handler _requests N/A len requests N/A request requests N/A N/A N/A N/A self dispatch N/A request N/A 0 N/A request N/A 1 N/A dispatch N/A N/A self method_name params N/A N/A N/A 
        This method walks the attribute tree in the method
        and passes the parameters, either in positional or
        keyword form, into the appropriate method on the
        Handler class. Currently supports only positional
        or keyword arguments, not mixed.
         N/A N/A hasattr RequestHandler method_name N/A N/A N/A N/A N/A self handler result N/A N/A N/A self faults method_not_found N/A method N/A self handler N/A method_list N/A dir method N/A N/A N/A method_list sort N/A attr_tree N/A N/A method_name split . N/A N/A N/A attr_name attr_tree N/A N/A method N/A N/A self check_method attr_name method N/A N/A N/A AttributeError N/A N/A N/A N/A N/A self handler result N/A N/A N/A self faults method_not_found N/A N/A N/A callable method N/A N/A N/A N/A N/A self handler result N/A N/A N/A self faults method_not_found N/A N/A N/A N/A method_name startswith _ N/A N/A getattr method private False True N/A N/A N/A N/A N/A self handler result N/A N/A N/A self faults method_not_found N/A args N/A N/A kwargs N/A N/A N/A isinstance params dict N/A N/A kwargs params N/A N/A N/A N/A type params N/A list tuple N/A N/A args params N/A N/A N/A N/A N/A self handler result N/A N/A N/A self faults invalid_params N/A N/A N/A N/A final_kwargs extra_args N/A getcallargs method args kwargs N/A N/A N/A TypeError N/A N/A N/A N/A N/A self handler result N/A N/A N/A self faults invalid_params N/A N/A N/A response N/A method extra_args final_kwargs N/A N/A N/A Exception N/A N/A N/A N/A self traceback method_name params N/A N/A N/A N/A self handler result N/A N/A N/A self faults internal_error N/A N/A getattr method async False N/A N/A N/A response None N/A N/A N/A N/A N/A self handler result N/A N/A N/A self faults internal_error N/A N/A N/A N/A N/A self handler result response N/A response N/A N/A self handler N/A N/A N/A 
        This is the callback for a single finished dispatch.
        Once all the dispatches have been run, it calls the
        parser library to parse responses and then calls the
        handler's async method.
         N/A N/A handler _requests 1 N/A N/A N/A handler _requests 0 N/A N/A N/A N/A handler _RPC_finished N/A N/A N/A Exception Error trying to send response twice. N/A N/A handler _RPC_finished True N/A responses N/A tuple N/A handler _results N/A response_text N/A N/A self parse_responses responses N/A N/A N/A type response_text N/A types StringTypes N/A N/A response_text N/A N/A self encode response_text N/A N/A N/A handler on_result response_text N/A traceback N/A N/A self method_name params N/A REQUEST N/A N/A N/A err_lines N/A N/A N/A N/A traceback format_exc splitlines N/A err_title N/A ERROR IN %s method_name N/A N/A N/A len params 0 N/A N/A err_title N/A %s - (PARAMS: %s) N/A err_title N/A repr params N/A err_sep N/A N/A - N/A len err_title N/A 79 N/A err_lines N/A N/A err_sep err_title err_sep err_lines N/A N/A config verbose N/A N/A N/A N/A N/A len err_lines 7 N/A config short_errors N/A N/A N/A N/A join N/A N/A err_lines N/A 0 4 N/A err_lines N/A -3 N/A N/A N/A N/A join err_lines N/A N/A parse_request N/A N/A self request_body N/A N/A N/A 
        Extend this on the implementing protocol. If it
        should error out, return the output of the
        'self.faults.fault_name' response. Otherwise,
        it MUST return a TUPLE of TUPLE. Each entry
        tuple must have the following structure:
        ('method_name', params)
        ...where params is a list or dictionary of
        arguments (positional or keyword, respectively.)
        So, the result should look something like
        the following:
        ( ('add', [5,4]), ('add', {'x':5, 'y':4}) )
         N/A N/A N/A N/A N/A parse_responses N/A N/A self responses N/A N/A N/A 
        Extend this on the implementing protocol. It must
        return a response that can be returned as output to
        the client.
         N/A N/A N/A self encode responses methodresponse True N/A check_method N/A N/A self attr_name obj N/A N/A N/A 
        Just checks to see whether an attribute is private
        (by the decorator or by a leading underscore) and
        returns boolean result.
         N/A N/A N/A attr_name startswith _ N/A N/A N/A AttributeError Private object or method. N/A attr N/A getattr obj attr_name N/A N/A getattr attr private False N/A N/A N/A AttributeError Private object or method. N/A attr N/A N/A BaseRPCHandler N/A RequestHandler N/A N/A 
    This is the base handler to be subclassed by the actual
    implementations and by the end user.
     N/A _RPC_ None N/A _results None N/A _requests 0 N/A _RPC_finished False post N/A N/A self N/A N/A N/A N/A self _results N/A N/A request_body N/A N/A self request body N/A N/A N/A N/A self _RPC_ run self request_body N/A N/A N/A tornado web asynchronous result N/A N/A self result N/A results N/A N/A  Use this to return a result.  N/A results N/A N/A results N/A N/A result results N/A N/A results result N/A N/A N/A N/A self _results append results N/A N/A N/A N/A self _RPC_ response self N/A on_result N/A N/A self response_text N/A N/A N/A  Asynchronous callback.  N/A N/A N/A self set_header Content-Type N/A N/A self _RPC_ content_type N/A N/A N/A self finish response_text N/A N/A FaultMethod N/A object N/A N/A 
    This is the 'dynamic' fault method so that the message can
    be changed on request from the parser.faults call.
     __init__ N/A N/A self fault code message N/A N/A N/A N/A self fault fault N/A N/A self code code N/A N/A self message message N/A __call__ N/A N/A self message N/A None N/A N/A message N/A N/A N/A self message message N/A N/A N/A self fault N/A self code N/A self message N/A N/A Faults N/A object N/A N/A 
    This holds the codes and messages for the RPC implementation.
    It is attached (dynamically) to the Parser when called via the
    parser.faults query, and returns a FaultMethod to be called so
    that the message can be changed. If the 'dynamic' attribute is
    not a key in the codes list, then it will error.

    USAGE:
        parser.fault.parse_error('Error parsing content.')

    If no message is passed in, it will check the messages dictionary
    for the same key as the codes dict. Otherwise, it just prettifies
    the code 'key' from the codes dict.

     N/A codes N/A parse_error method_not_found invalid_request invalid_params internal_error -32700 -32601 -32600 -32602 -32603 N/A messages N/A __init__ N/A N/A self parser fault N/A None N/A N/A N/A self library N/A parser library N/A N/A self fault fault N/A N/A N/A self fault N/A N/A N/A self fault N/A getattr N/A self library Fault N/A __getattr__ N/A N/A self attr N/A N/A N/A message Error N/A N/A attr N/A N/A N/A self messages keys N/A N/A message N/A N/A self messages N/A attr N/A N/A message N/A N/A join N/A map N/A str capitalize N/A N/A attr split _ N/A fault N/A FaultMethod N/A self fault N/A N/A self codes N/A attr message N/A fault N/A N/A N/A 
Utility Functions
 private N/A N/A func N/A N/A N/A 
    Use this to make a method private.
    It is intended to be used as a decorator.
    If you wish to make a method tree private, just
    create and set the 'private' variable to True
    on the tree object itself.
     N/A N/A func private True N/A func N/A async N/A N/A func N/A N/A N/A 
    Use this to make a method asynchronous
    It is intended to be used as a decorator.
    Make sure you call "self.result" on any
    async method. Also, trees do not currently
    support async methods.
     N/A N/A func async True N/A func N/A start_server N/A N/A handlers route port N/A / 8080 N/A N/A 
    This is just a friendly wrapper around the default
    Tornado instantiation calls. It simplifies the imports
    and setup calls you'd make otherwise.
    USAGE:
        start_server(handler_class, route=r'/', port=8181)
     N/A N/A N/A type handlers N/A N/A types ListType N/A types TupleType N/A N/A handler handlers N/A handlers N/A N/A route handler N/A N/A route /RPC2 N/A N/A N/A N/A handlers append N/A /RPC2 handler N/A application N/A N/A N/A tornado web Application handlers N/A http_server N/A N/A N/A tornado httpserver HTTPServer application N/A N/A N/A http_server listen port N/A loop_instance N/A N/A N/A N/A tornado ioloop IOLoop instance N/A  Setting the '_server' attribute if not set  N/A N/A route handler handlers N/A N/A N/A N/A N/A setattr handler _server loop_instance N/A N/A N/A AttributeError N/A N/A N/A handler _server loop_instance N/A N/A N/A loop_instance start N/A loop_instance N/A N/A 
The following is a test implementation which should work
for both the XMLRPC and the JSONRPC clients.
 TestMethodTree N/A object N/A power N/A N/A self x y N/A 2 N/A N/A N/A pow x y N/A private N/A N/A self N/A N/A N/A False N/A private N/A TestRPCHandler N/A BaseRPCHandler N/A N/A _RPC_ None add N/A N/A self x y N/A N/A N/A N/A x y N/A ping N/A N/A self x N/A N/A N/A x N/A noargs N/A N/A self N/A N/A N/A Works! N/A N/A tree N/A TestMethodTree _private N/A N/A self N/A N/A N/A False N/A private N/A N/A self N/A N/A N/A False N/A private N/A