Package cherrypy :: Module _cptools
[hide private]
[frames] | no frames]

Module _cptools

source code

CherryPy tools. A "tool" is any helper, adapted to CP.

Tools are usually designed to be used in a variety of ways (although some
may only offer one if they choose):
    
    Library calls
        All tools are callables that can be used wherever needed.
        The arguments are straightforward and should be detailed within the
        docstring.
    
    Function decorators
        All tools, when called, may be used as decorators which configure
        individual CherryPy page handlers (methods on the CherryPy tree).
        That is, "@tools.anytool()" should "turn on" the tool via the
        decorated function's _cp_config attribute.
    
    CherryPy config
        If a tool exposes a "_setup" callable, it will be called
        once per Request (if the feature is "turned on" via config).

Tools may be implemented as any object with a namespace. The builtins
are generally either modules or instances of the tools.Tool class.

Classes [hide private]
  Tool
A registered function for use with CherryPy request-processing hooks.
  HandlerTool
Tool which is called 'before main', that may skip normal handlers.
  HandlerWrapperTool
Tool which wraps request.handler in a provided wrapper function.
  ErrorTool
Tool which is used to replace the default request.error_response.
  SessionTool
Session Tool for CherryPy.
  XMLRPCController
A Controller (page handler collection) for XML-RPC.
  SessionAuthTool
  CachingTool
Caching Tool for CherryPy.
  Toolbox
A collection of Tools.
  DeprecatedTool
Functions [hide private]
 
_getargs(func)
Return the names of all static arguments to the given function.
source code
Variables [hide private]
  _attr_error = 'CherryPy Tools cannot be turned on directly. In...
  default_toolbox = Toolbox("tools")
  __package__ = 'cherrypy'
Variables Details [hide private]

_attr_error

Value:
'CherryPy Tools cannot be turned on directly. Instead, turn them on vi\
a config, or use them as decorators on your page handlers.'