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

Class Application

source code

object --+
         |
        Application

A CherryPy Application.

Servers and gateways should not instantiate Request objects directly. Instead, they should ask an Application object for a request object.

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

Nested Classes [hide private]
  request_class
An HTTP request.
  response_class
An HTTP Response, including status, headers, and body.
Instance Methods [hide private]
 
__init__(self, root, script_name='', config=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__repr__(self)
repr(x)
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
 
find_config(self, path, key, default=None)
Return the most-specific value for key along path, or default.
source code
 
get_serving(self, local, remote, scheme, sproto)
Create and return a Request and Response object.
source code
 
release_serving(self)
Release the current serving (request and response).
source code
 
__call__(self, environ, start_response) source code

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

Class Variables [hide private]
  root = None
The top-most container of page handlers for this app.
  config = {}
A dict of {path: pathconf} pairs, where 'pathconf' is itself a dict of {key: value} pairs.
  namespaces = cherrypy.lib.reprconf.NamespaceSet({})
  toolboxes = {'tools': <cherrypy._cptools.Toolbox object>}
  log = None
A LogManager instance.
  wsgiapp = None
A CPWSGIApp instance.
  relative_urls = False
  script_name_doc = 'The URI "mount point" for this app. A mount...
Properties [hide private]
  script_name
The URI "mount point" for this app.

Inherited from object: __class__

Method Details [hide private]

__init__(self, root, script_name='', config=None)
(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]

root

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.

Value:
None

log

A LogManager instance. See _cplogging.

Value:
None

wsgiapp

A CPWSGIApp instance. See _cpwsgi.

Value:
None

script_name_doc

Value:
'''The URI "mount point" for this app. A mount point
    is that portion of the URI which is constant for all URIs that are
    serviced by this application; it does not include scheme, host, or\
 proxy
    ("virtual host") portions of the URI.

    For example, if script_name is "/my/cool/app", then the URL
    "http://www.example.com/my/cool/app/page1" might be handled by a
...

Property Details [hide private]

script_name

The URI "mount point" for this app. A mount point is that portion of the URI which is constant for all URIs that are serviced by this application; it does not include scheme, host, or proxy ("virtual host") portions of the URI.

For example, if script_name is "/my/cool/app", then the URL "http://www.example.com/my/cool/app/page1" might be handled by a "page1" method on the root object.

The value of script_name MUST NOT end in a slash. If the script_name refers to the root of the URI, it MUST be an empty string (not "/").

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:
_get_script_name(self)
Set Method:
_set_script_name(self, value)