App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Static Public Member Functions | List of all members
google.appengine.tools.devappserver2.module.Module Class Reference
Inheritance diagram for google.appengine.tools.devappserver2.module.Module:
google.appengine.tools.devappserver2.module.AutoScalingModule google.appengine.tools.devappserver2.module.BasicScalingModule google.appengine.tools.devappserver2.module.InteractiveCommandModule google.appengine.tools.devappserver2.module.ManualScalingModule google.appengine.tools.devappserver2.module_test.ModuleFacade google.appengine.tools.devappserver2.dispatcher_test.AutoScalingModuleFacade google.appengine.tools.devappserver2.module_test.AutoScalingModuleFacade google.appengine.tools.devappserver2.module_test.BasicScalingModuleFacade google.appengine.tools.devappserver2.dispatcher_test.ManualScalingModuleFacade google.appengine.tools.devappserver2.module_test.ManualScalingModuleFacade

Public Member Functions

def __init__
 
def name
 
def ready
 
def balanced_port
 
def host
 
def balanced_address
 
def max_instance_concurrent_requests
 
def module_configuration
 
def supports_interactive_commands
 
def set_num_instances
 
def get_num_instances
 
def suspend
 
def resume
 
def get_instance_address
 
def get_instance_port
 
def get_instance
 
def supports_individually_addressable_instances
 
def create_interactive_command_module
 
def build_request_environ
 

Static Public Member Functions

def generate_request_log_id
 
def generate_request_id_hash
 

Detailed Description

The abstract base for all instance pool implementations.

Constructor & Destructor Documentation

def google.appengine.tools.devappserver2.module.Module.__init__ (   self,
  module_configuration,
  host,
  balanced_port,
  api_host,
  api_port,
  auth_domain,
  runtime_stderr_loglevel,
  php_config,
  python_config,
  cloud_sql_config,
  vm_config,
  default_version_port,
  port_registry,
  request_data,
  dispatcher,
  max_instances,
  use_mtime_file_watcher,
  automatic_restarts,
  allow_skipped_files,
  threadsafe_override 
)
Initializer for Module.
Args:
  module_configuration: An application_configuration.ModuleConfiguration
  instance storing the configuration data for a module.
  host: A string containing the host that any HTTP servers should bind to
  e.g. "localhost".
  balanced_port: An int specifying the port where the balanced module for
  the pool should listen.
  api_host: The host that APIModule listens for RPC requests on.
  api_port: The port that APIModule listens for RPC requests on.
  auth_domain: A string containing the auth domain to set in the environment
  variables.
  runtime_stderr_loglevel: An int reprenting the minimum logging level at
  which runtime log messages should be written to stderr. See
  devappserver2.py for possible values.
  php_config: A runtime_config_pb2.PhpConfig instances containing PHP
  runtime-specific configuration. If None then defaults are used.
  python_config: A runtime_config_pb2.PythonConfig instance containing
  Python runtime-specific configuration. If None then defaults are
  used.
  cloud_sql_config: A runtime_config_pb2.CloudSQL instance containing the
  required configuration for local Google Cloud SQL development. If None
  then Cloud SQL will not be available.
  vm_config: A runtime_config_pb2.VMConfig instance containing
  VM runtime-specific configuration. If None all docker-related stuff
  is disabled.
  default_version_port: An int containing the port of the default version.
  port_registry: A dispatcher.PortRegistry used to provide the Dispatcher
  with a mapping of port to Module and Instance.
  request_data: A wsgi_request_info.WSGIRequestInfo that will be provided
  with request information for use by API stubs.
  dispatcher: A Dispatcher instance that can be used to make HTTP requests.
  max_instances: The maximum number of instances to create for this module.
  If None then there is no limit on the number of created instances.
  use_mtime_file_watcher: A bool containing whether to use mtime polling to
  monitor file changes even if other options are available on the
  current platform.
  automatic_restarts: If True then instances will be restarted when a
  file or configuration change that effects them is detected.
  allow_skipped_files: If True then all files in the application's directory
  are readable, even if they appear in a static handler or "skip_files"
  directive.
  threadsafe_override: If not None, ignore the YAML file value of threadsafe
  and use this value instead.

Member Function Documentation

def google.appengine.tools.devappserver2.module.Module.balanced_address (   self)
The address of the balanced HTTP server e.g. "localhost:8080".
def google.appengine.tools.devappserver2.module.Module.balanced_port (   self)
The port that the balanced HTTP server for the Module is listening on.
def google.appengine.tools.devappserver2.module.Module.create_interactive_command_module (   self)
Returns a InteractiveCommandModule that can be sent user commands.
def google.appengine.tools.devappserver2.module.Module.generate_request_id_hash ( )
static
Generate a random REQUEST_ID_HASH.
def google.appengine.tools.devappserver2.module.Module.generate_request_log_id ( )
static
Generate a random REQUEST_LOG_ID.

Returns:
  A string suitable for use as a REQUEST_LOG_ID. The returned string is
  variable length to emulate the production values, which encapsulate
  the application id, version and some log state.
def google.appengine.tools.devappserver2.module.Module.get_instance (   self,
  instance_id 
)
Returns the instance with the provided instance ID.
def google.appengine.tools.devappserver2.module.Module.get_instance_address (   self,
  instance_id 
)
Returns the address of the HTTP server for an instance.
def google.appengine.tools.devappserver2.module.Module.get_instance_port (   self,
  instance_id 
)
Returns the port of the HTTP server for an instance.
def google.appengine.tools.devappserver2.module.Module.get_num_instances (   self)
Returns the number of instances for this module to run.
def google.appengine.tools.devappserver2.module.Module.host (   self)
The host that the HTTP server(s) for this Module is listening on.
def google.appengine.tools.devappserver2.module.Module.max_instance_concurrent_requests (   self)
The number of concurrent requests that each Instance can handle.
def google.appengine.tools.devappserver2.module.Module.module_configuration (   self)
The application_configuration.ModuleConfiguration for this module.
def google.appengine.tools.devappserver2.module.Module.name (   self)
The name of the module, as defined in app.yaml.

This value will be constant for the lifetime of the module even in the
module configuration changes.
def google.appengine.tools.devappserver2.module.Module.ready (   self)
The module is ready to handle HTTP requests.
def google.appengine.tools.devappserver2.module.Module.resume (   self)
Restarts the module.
def google.appengine.tools.devappserver2.module.Module.set_num_instances (   self,
  instances 
)
Sets the number of instances for this module to run.

Args:
  instances: An int containing the number of instances to run.
Raises:
  request_info.NotSupportedWithAutoScalingError: Always.
def google.appengine.tools.devappserver2.module.Module.supports_interactive_commands (   self)
True if the module can evaluate arbitrary code and return the result.
def google.appengine.tools.devappserver2.module.Module.suspend (   self)
Stops the module from serving requests.

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