Package cherrypy :: Module _cptree :: Class Application
[hide private]
[frames] | no frames]

Class Application

source code

object --+
         |
        Application

A CherryPy Application.
    
    An instance of this class may also be used as a WSGI callable
    (WSGI application object) for itself.
    

config [= {}]:
    A dict of {path: pathconf} pairs, where 'pathconf' is itself a dict
    of {key: value} pairs.

log [= None]:
    A LogManager instance. See _cplogging.

root [= None]:
    The top-most container of page handlers for this app. Handlers should
    be arranged in a hierarchy of attributes, matching the expected URI
    hierarchy; the default dispatcher then searches this hierarchy for a
    matching handler. When using a dispatcher other than the default,
    this value may be None.

script_name [= <property object at 0x832abbc>]:
    The URI "mount point" for this app; for example, if script_name is
    "/my/cool/app", then the URL "http://my.domain.tld/my/cool/app/page1"
    might be handled by a "page1" method on the root object. If script_name
    is explicitly set to None, then the script_name will be provided
    for each call from request.wsgi_environ['SCRIPT_NAME'].

wsgiapp [= None]:
    A CPWSGIApp instance. See _cpwsgi.



Nested Classes [hide private]
  __metaclass__
Metaclass for declaring docstrings for class attributes.
Instance Methods [hide private]
 
__init__(self, root, script_name='')
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_get_script_name(self) source code
 
_set_script_name(self, value) source code
 
merge(self, config)
Merge the given config into self.config.
source code
 
__call__(self, environ, start_response) source code

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

Class Variables [hide private]
  root = None
  root__doc = ...
  config = {}
  config__doc = ...
  namespaces = cherrypy._cpconfig.NamespaceSet({})
  log = None
  log__doc = """A LogManager instance. See _cplogging."""
  wsgiapp = None
  wsgiapp__doc = """A CPWSGIApp instance. See _cpwsgi."""
  script_name__doc = ...
Properties [hide private]
  script_name
The URI "mount point" for this app; for example, if script_name is "/my/cool/app", then the URL "http://my.domain.tld/my/cool/app/page1" might be handled by a "page1" method on the root object.

Inherited from object: __class__

Method Details [hide private]

__init__(self, root, script_name='')
(Constructor)

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

Class Variable Details [hide private]

root__doc

Value:
"""
    The top-most container of page handlers for this app. Handlers sho\
uld
    be arranged in a hierarchy of attributes, matching the expected UR\
I
    hierarchy; the default dispatcher then searches this hierarchy for\
 a
    matching handler. When using a dispatcher other than the default,
...

config__doc

Value:
"""
    A dict of {path: pathconf} pairs, where 'pathconf' is itself a dic\
t
    of {key: value} pairs."""

script_name__doc

Value:
"""
    The URI "mount point" for this app; for example, if script_name is
    "/my/cool/app", then the URL "http://my.domain.tld/my/cool/app/pag\
e1"
    might be handled by a "page1" method on the root object. If script\
_name
    is explicitly set to None, then the script_name will be provided
    for each call from request.wsgi_environ['SCRIPT_NAME']."""

Property Details [hide private]

script_name

The URI "mount point" for this app; for example, if script_name is "/my/cool/app", then the URL "http://my.domain.tld/my/cool/app/page1" might be handled by a "page1" method on the root object. If script_name is explicitly set to None, then the script_name will be provided for each call from request.wsgi_environ['SCRIPT_NAME'].
Get Method:
cherrypy._cptree.Application._get_script_name(self)
Set Method:
cherrypy._cptree.Application._set_script_name(self, value)