Google Code offered in: English - Español - 日本語 - 한국어 - Português - Pусский - 中文(简体) - 中文(繁體)
ProtoRPC is an experimental, innovative, and rapidly changing new feature for App Engine. Unfortunately, being on the bleeding edge means that we may make backwards-incompatible changes to ProtoRPC. We will inform the community when this feature is no longer experimental.
The protorpc.webapp.service_handlers
package provides the following functions:
Creates a services mapping for use with webapp.
Creates basic default configuration and registration for ProtoRPC services. Each service listed in the service mapping has a standard service handler factory created for it.
The list of mappings can either be an explicit path to service mapping or just services. If mappings are just services, they will automatically be mapped to their default name. For example:
from protorpc import remote from protorpc.webapp import service_handlers package = 'my_package' class MyService(remote.Service): ... service_handlers.service_mapping( [('/my_path', MyService), # Maps to /my_path MyService, # Maps to /my_package/MyService ])
Normally, services are mapped to URL paths by specifying a tuple (path, service), where path is the path where the service resides, and service is the service class or service factory for creating new instances of the service. For more information about service factories, please see remote.Service.new_factory.
If no tuple is provided, and therefore no path specified, a default path is calculated by using the fully qualified service name using a URL path separator for each of its components instead of a '.'.
Arguments:
path
is the path where the service resides, and service
is the service class or service factory for creating new instances of the service. For more information about service factories, please see remote.Service.new_factory.Returns a list of tuples defining a mapping of request handlers compatible with a WebApp application.
Raises a ServiceConfigurationError when duplicate paths are provided.
Handles CGI request using service mapping.
Arguments:
path
is the path where the service resides, and service
is the service class or service factory for creating new instances of the service. For more information about service factories, please see remote.Service.new_factory.