# The WSGIApplication Class - Google App Engine - Google Code

English ▼
Skip to page content Skip to main navigation
e.g. "templates" or "datastore"

# The WSGIApplication Class

The `google.appengine.ext.webapp` package provides the following classes:

class WSGIApplication(url_mapping, debug=False)

  A WSGI-compatible application that maps URL paths to RequestHandler classes. An App Engine CGI script creates a WSGIApplication object, then runs it using a WSGI CGI handler such as run_wsgi_app().

  Arguments:

  url_mapping
    A mapping of URL paths to request handlers, as a list of tuples where each tuple is a path-to-handler mapping. The first element of the tuple specifies the URL path as a string. The second element of the tuple is the constructor of a request handler class, a subclass of RequestHandler.
  debug
    If `True`, the application runs in "debug mode." Primarily, this means that the request handler's handle_exception() method is called with debug_mode=`True` when the handler raises an exception, which prints debugging information to the web browser.