Package cherrypy :: Module _cprequest :: Class Hook
[hide private]
[frames] | no frames]

Class Hook

source code

object --+
         |
        Hook

A callback and its metadata: failsafe, priority, and kwargs.

Instance Methods [hide private]
 
__init__(self, callback, failsafe=None, priority=None, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__lt__(self, other) source code
 
__cmp__(self, other) source code
 
__call__(self)
Run self.callback(**self.kwargs).
source code
 
__repr__(self)
repr(x)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  callback = None
The bare callable that this Hook object is wrapping, which will be called when the Hook is called.
  failsafe = False
If True, the callback is guaranteed to run even if other callbacks from the same call point raise exceptions.
  priority = 50
Defines the order of execution for a list of Hooks.
  kwargs = {}
A set of keyword arguments that will be passed to the callable on each call.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, callback, failsafe=None, priority=None, **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

Class Variable Details [hide private]

priority

Defines the order of execution for a list of Hooks. Priority numbers should be limited to the closed interval [0, 100], but values outside this range are acceptable, as are fractional values.

Value:
50