App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | List of all members
google.appengine.tools.devappserver2.wsgi_request_info.WSGIRequestInfo Class Reference
Inheritance diagram for google.appengine.tools.devappserver2.wsgi_request_info.WSGIRequestInfo:

Public Member Functions

def __init__
 
def request
 
def start_request
 
def end_request
 
def set_request_instance
 
def get_request_url
 
def get_request_environ
 
def get_dispatcher
 
def get_module
 
def get_version
 
def get_instance
 

Detailed Description

Associates request state, derived from a WSGI environ, with a unique id.

Constructor & Destructor Documentation

def google.appengine.tools.devappserver2.wsgi_request_info.WSGIRequestInfo.__init__ (   self,
  dispatcher 
)
Initializer for WSGIRequestInfo.

Args:
  dispatcher: A request_info.Dispatcher instance to provide to API stubs.

Member Function Documentation

def google.appengine.tools.devappserver2.wsgi_request_info.WSGIRequestInfo.end_request (   self,
  request_id 
)
Removes the information associated with given request_id.
def google.appengine.tools.devappserver2.wsgi_request_info.WSGIRequestInfo.get_dispatcher (   self)
Returns the Dispatcher.

Returns:
  The Dispatcher instance.
def google.appengine.tools.devappserver2.wsgi_request_info.WSGIRequestInfo.get_instance (   self,
  request_id 
)
Returns the instance serving this request.

Args:
  request_id: The string id of the request making the API call.

Returns:
  The instance.Instance serving this request or None if no instance is
  serving it.
def google.appengine.tools.devappserver2.wsgi_request_info.WSGIRequestInfo.get_module (   self,
  request_id 
)
Returns the name of the module serving this request.

Args:
  request_id: The string id of the request making the API call.

Returns:
  A str containing the module name.
def google.appengine.tools.devappserver2.wsgi_request_info.WSGIRequestInfo.get_request_environ (   self,
  request_id 
)
Returns a dict containing the WSGI environ for the request.
def google.appengine.tools.devappserver2.wsgi_request_info.WSGIRequestInfo.get_request_url (   self,
  request_id 
)
Returns the URL the request e.g. 'http://localhost:8080/foo?bar=baz'.

Args:
  request_id: The string id of the request making the API call.

Returns:
  The URL of the request as a string.
def google.appengine.tools.devappserver2.wsgi_request_info.WSGIRequestInfo.get_version (   self,
  request_id 
)
Returns the version of the module serving this request.

Args:
  request_id: The string id of the request making the API call.

Returns:
  A str containing the version.
def google.appengine.tools.devappserver2.wsgi_request_info.WSGIRequestInfo.request (   self,
  environ,
  module_configuration 
)
A context manager that consumes a WSGI environ and returns a request id.

with request_information.request(environ, app_info_external) as request_id:
  # Stubs will have access to the state associated with request_id only in
  # this context.
  send_request_to_runtime(request_id, ...)

Args:
  environ: An environ dict for the request as defined in PEP-333.
  module_configuration: An application_configuration.ModuleConfiguration
  instance respresenting the current module configuration.

Returns:
  A unique string id that will be associated with the request.
def google.appengine.tools.devappserver2.wsgi_request_info.WSGIRequestInfo.start_request (   self,
  environ,
  module_configuration 
)
Adds the WSGI to the state of the class and returns a request id.

Args:
  environ: An environ dict for the request as defined in PEP-333.
  module_configuration: An application_configuration.ModuleConfiguration
  instance respresenting the current module configuration.

Returns:
  A unique string id that will be associated with the request.

The documentation for this class was generated from the following file: