Module Expr Str ImportFrom alias ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Dict NameLoad Str body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If NameLoad body For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str orelse Return ListComp SubscriptLoad NameLoad Index Str comprehension NameStore AttributeLoad NameLoad attr decorator_list NameLoad decorator_list
N/A N/A 
Decorator for a `tornado.web.RequestHandler` configuring the route and
initialization dict.

The `Route` decorator stores all routes inside a class level list. You can then
add all routes to the application using the `Route.routes` method. Some
examples::

    from tornadotools.route import Route

    @Route(r"/")
    class SimpleHandler(RequestHandler):
        pass

    @Route(r"/test_with_name", name="test")
    class SimpleHandler2(RequestHandler):
        pass

    @Route(r"/test_with_init", initialize={'init': 'dictionary'})
    class SimpleHandler3(RequestHandler):
        pass

    app = Application([
        # other routes
        ] + Route.routes()
    )

Tornado also support multiple hosts. When you want to use this with the `Route`
decorator, you have to create the `tornado.web.Application` like this::

    from tornadotools.route import Route

    @Route(r"/.*", host="www\.example\.com")
    class HostHandler(RequestHandler):
        pass

    app = Application([])
    Route.routes(app)
 tornado.web URLSpec Route N/A object N/A N/A 
    The `Route` decorator.
     N/A _routes N/A N/A 
    Class level list of routes.
     __init__ N/A N/A self route initialize name host N/A N/A None .*$ N/A N/A N/A self route route N/A N/A self initialize initialize N/A N/A self name name N/A N/A self host host N/A __call__ N/A N/A self handler N/A N/A N/A 
        Called when we decorate a class.
         N/A name N/A N/A self name N/A handler __name__ N/A spec N/A URLSpec N/A self route handler N/A self initialize name name N/A N/A N/A N/A self _routes append N/A host spec N/A self host spec N/A handler N/A routes N/A N/A cls application N/A None N/A N/A 
        Method for adding the routes to the `tornado.web.Application`.
         N/A application N/A N/A route N/A cls _routes N/A N/A N/A N/A application add_handlers N/A route N/A host N/A route N/A spec N/A N/A N/A N/A route N/A spec N/A route N/A cls _routes N/A classmethod N/A