Module Expr Str Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Dict Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args defaults body TryFinally body Expr Call NameLoad Expr Call NameLoad NameLoad NameLoad finalbody Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list Return Call NameLoad NameLoad TupleLoad decorator_list Return NameLoad decorator_list Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str TryFinally body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad Call NameLoad NameLoad If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Str orelse Assign SubscriptStore NameLoad Index Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpOr CompareIn Str NameLoad Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Return NameLoad finalbody Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad AttributeLoad NameLoad attr orelse If CompareEq AttributeLoad NameLoad attr Str body Assign SubscriptStore NameLoad Index Str Str orelse If CompareEq AttributeLoad NameLoad attr Str body Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign SubscriptStore NameLoad Index Str Str Return NameLoad decorator_list
N/A N/A A Python 2.7 runtime module.

Provides a Python 2.7 runtime that calls into user-provided code using a CGI or
WSGI interface.
 N/A cStringIO N/A thread N/A threading N/A urlparse google.appengine.api.logservice logservice google.appengine.runtime cgi google.appengine.runtime request_environment google.appengine.runtime wsgi _MakeStartNewThread N/A N/A base_start_new_thread N/A N/A N/A Returns a replacement for start_new_thread that inherits environment.

  Returns a function with an interface that matches thread.start_new_thread
  where the new thread inherits the request environment of
  request_environment.current_request and cleans it up when it terminates.

  Args:
    base_start_new_thread: The thread.start_new_thread function to call to
        create a new thread.

  Returns:
    A replacement for start_new_thread.
   StartNewThread N/A N/A target args kw N/A None N/A N/A A replacement for thread.start_new_thread.

    A replacement for thread.start_new_thread that inherits RequestEnvironment
    state from its creator and cleans up that state when it terminates.

    Args:
      See thread.start_new_thread.

    Returns:
      See thread.start_new_thread.
     N/A N/A kw None N/A N/A kw N/A N/A cloner N/A N/A N/A request_environment current_request CloneRequestEnvironment Run N/A N/A N/A N/A N/A N/A N/A N/A cloner N/A N/A target args kw N/A N/A N/A N/A N/A request_environment current_request Clear N/A N/A N/A base_start_new_thread Run N/A N/A N/A StartNewThread N/A N/A N/A thread start_new_thread N/A _MakeStartNewThread N/A thread start_new_thread N/A N/A reload threading HandleRequest N/A N/A environ handler_name url post_data application_root python_lib import_hook N/A None N/A N/A Handles a single request.

  Handles a single request for handler_name by dispatching to the appropriate
  server interface implementation (CGI or WSGI) depending on the form of
  handler_name. The arguments are processed to fill url and post-data related
  environ members.

  Args:
    environ: A dict containing the environ for this request (i.e. for
        os.environ).
    handler_name: A str containing the user-specified handler to use for this
        request, i.e. the script parameter for a handler in app.yaml; e.g.
        'package.module.application' for a WSGI handler or 'path/to/handler.py'
        for a CGI handler.
    url: The requested url.
    post_data: The post data for this request.
    application_root: A str containing the root path of the application.
    python_lib: A str containing the root the Python App Engine library.
    import_hook: Optional import hook (PEP 302 style loader).

  Returns:
    A dict containing:
      error: App Engine error code. 0 for OK, 1 for error.
      response_code: The HTTP response code.
      headers: A list of str tuples (key, value) of HTTP headers.
      body: A str of the body of the response
      logs: A list of tuples (timestamp_usec, severity, message) of log entries.
          timestamp_usec is a long, severity is int and message is str. Severity
          levels are 0..4 for Debug, Info, Warning, Error, Critical.
   N/A N/A N/A error N/A N/A logservice LogsBuffer N/A N/A N/A N/A request_environment current_request Init error environ N/A url N/A N/A urlparse urlsplit url N/A N/A N/A environ update N/A CgiDictFromParsedUrl url N/A post_data N/A N/A N/A environ N/A CONTENT_LENGTH N/A str N/A len post_data N/A N/A HTTP_CONTENT_TYPE environ N/A N/A N/A environ N/A CONTENT_TYPE N/A environ N/A HTTP_CONTENT_TYPE N/A N/A N/A environ N/A CONTENT_TYPE application/x-www-form-urlencoded N/A post_data N/A N/A cStringIO StringIO post_data N/A N/A N/A / handler_name N/A N/A handler_name endswith .py N/A N/A response N/A N/A cgi HandleRequest environ handler_name url post_data error application_root python_lib import_hook N/A N/A response N/A N/A wsgi HandleRequest environ handler_name url post_data error N/A N/A response N/A logs N/A N/A error parse_logs N/A response N/A N/A N/A N/A N/A request_environment current_request Clear N/A CgiDictFromParsedUrl N/A N/A url N/A N/A N/A Extract CGI variables from a parsed url into a dict.

  Returns a dict containing the following CGI variables for the provided url:
  SERVER_PORT, QUERY_STRING, SERVER_NAME and PATH_INFO.

  Args:
    url: An instance of urlparse.SplitResult.

  Returns:
    A dict containing the CGI variables derived from url.
   N/A environ N/A N/A N/A N/A url port None N/A N/A N/A environ N/A SERVER_PORT N/A str N/A url port N/A N/A N/A N/A url scheme https N/A N/A N/A environ N/A SERVER_PORT 443 N/A N/A N/A N/A url scheme http N/A N/A N/A environ N/A SERVER_PORT 80 N/A N/A environ N/A QUERY_STRING N/A url query N/A N/A environ N/A SERVER_NAME N/A url hostname N/A N/A url path N/A N/A N/A environ N/A PATH_INFO N/A N/A urlparse unquote N/A url path N/A N/A N/A environ N/A PATH_INFO / N/A environ N/A