class documentation

class Route(object):

View In Hierarchy

This class wraps a route callback along with route specific metadata and configuration and applies Plugins on demand. It is also responsible for turing an URL path rule into a regular expression usable by the Router.
Method all​_plugins Yield all Plugins affecting this route.
Method get​_callback​_args Return a list of argument names the callback (most likely) accepts as keyword arguments. If the callback is a decorated function, try to recover the original function before inspection.
Method get​_config Lookup a config field and return its value, first checking the route.config, then route.app.config.
Method get​_undecorated​_callback Return the callback. If the callback is a decorated function, try to recover the original function.
Method prepare Do all on-demand work immediately (useful for debugging).
Method reset Forget any cached values. The next time call is accessed, all plugins are re-applied.
Instance Variable app Undocumented
Instance Variable callback Undocumented
Instance Variable config Undocumented
Instance Variable method Undocumented
Instance Variable name Undocumented
Instance Variable plugins Undocumented
Instance Variable rule Undocumented
Instance Variable skiplist Undocumented
Method __call__ Undocumented
Method __init__ Undocumented
Method __repr__ Undocumented
Method ​_make​_callback Undocumented
Property ​_context Undocumented
Property call The route callback with all plugins applied. This property is created on demand and then cached to speed up subsequent requests.
def all_plugins(self):
Yield all Plugins affecting this route.
def get_callback_args(self):
Return a list of argument names the callback (most likely) accepts as keyword arguments. If the callback is a decorated function, try to recover the original function before inspection.
def get_config(self, key, default=None):
Lookup a config field and return its value, first checking the route.config, then route.app.config.
def get_undecorated_callback(self):
Return the callback. If the callback is a decorated function, try to recover the original function.
def prepare(self):
Do all on-demand work immediately (useful for debugging).
def reset(self):
Forget any cached values. The next time call is accessed, all plugins are re-applied.
app =

Undocumented

callback =

Undocumented

config =

Undocumented

method =

Undocumented

name =

Undocumented

plugins =

Undocumented

rule =

Undocumented

skiplist =

Undocumented

def __call__(self, *a, **ka):

Undocumented

def __init__(self, app, rule, method, callback, name=None, plugins=None, skiplist=None, **config):

Undocumented

def __repr__(self):

Undocumented

def _make_callback(self):

Undocumented

@property
_context =

Undocumented

@cached_property
call =
The route callback with all plugins applied. This property is created on demand and then cached to speed up subsequent requests.