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

Class WSGIAppTool

source code

object --+        
         |        
      Tool --+    
             |    
   HandlerTool --+
                 |
                WSGIAppTool

A tool for running any WSGI middleware/application within CP.

Here are the parameters:

wsgi_app - any wsgi application callable
env_update - a dictionary with arbitrary keys and values to be
             merged with the WSGI environ dictionary.

Example:

class Whatever:
    _cp_config = {'tools.wsgiapp.on': True,
                  'tools.wsgiapp.app': some_app,
                  'tools.wsgiapp.env': app_environ,
                  }

Instance Methods [hide private]
 
_setup(self)
Hook this tool into cherrypy.request.
source code

Inherited from HandlerTool: __init__, handler

Inherited from HandlerTool (private): _wrapper

Inherited from Tool: __call__

Inherited from Tool (private): _merged_args, _setargs

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]

Inherited from Tool: namespace

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_setup(self)

source code 

Hook this tool into cherrypy.request.

The standard CherryPy request object will automatically call this method when the tool is "turned on" in config.

Overrides: Tool._setup
(inherited documentation)