Package cherrypy :: Module _cpwsgi :: Class CPWSGIApp
[hide private]
[frames] | no frames]

Class CPWSGIApp

source code

object --+
         |
        CPWSGIApp

A WSGI application object for a CherryPy Application.

pipeline: a list of (name, wsgiapp) pairs. Each 'wsgiapp' MUST be a
    constructor that takes an initial, positional 'nextapp' argument,
    plus optional keyword arguments, and returns a WSGI application
    (that takes environ and start_response arguments). The 'name' can
    be any you choose, and will correspond to keys in self.config.

head: rather than nest all apps in the pipeline on each call, it's only
    done the first time, and the result is memoized into self.head. Set
    this to None again if you change self.pipeline after calling self.

config: a dict whose keys match names listed in the pipeline. Each
    value is a further dict which will be passed to the corresponding
    named WSGI callable (from the pipeline) as keyword arguments.



Nested Classes [hide private]
  response_class
Instance Methods [hide private]
 
__init__(self, cpapp, pipeline=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
tail(self, environ, start_response)
WSGI application callable for the actual CherryPy application.
source code
 
__call__(self, environ, start_response) source code
 
namespace_handler(self, k, v)
Config handler for the 'wsgi' namespace.
source code

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

Class Variables [hide private]
  pipeline = [('iredir', <class 'cherrypy._cpwsgi.InternalRedire...
  head = None
  config = {}
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, cpapp, pipeline=None)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

tail(self, environ, start_response)

source code 

WSGI application callable for the actual CherryPy application.

You probably shouldn't call this; call self.__call__ instead, so that any WSGI middleware in self.pipeline can run first.

Class Variable Details [hide private]

pipeline

Value:
[('iredir', <class 'cherrypy._cpwsgi.InternalRedirector'>)]