Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



WSGI Service Library

This module contains classes that publish a Google Protocol RPC service as a WSGI application.

The protorpc.wsgi.service package provides the following functions:

service_mapping ( service_factory , service_path = r'.*' , protocols = None )

Creates a WSGI application that handles a single Google Protocol RPC service mapping.

Arguments

service_factory
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 .
service_path = r'.*'
The path where the service resides.
protocols = None
A remote.Protocols instance that configures supported protocols on the server.

Returns a WSGI application that handles a single Google Protocol RPC service mapping.

service_mappings ( services , registry_path = DEFAULT_REGISTRY_PATH )

Creates a WSGI application with multiple service mappings with an optional registry service. For example:

from protorpc import remote
from protorpc.wsgi import service

package = 'my_package'

class MyService(remote.Service):
  ...

class MyOtherService(remote.Service):
  ...

app = service_handlers.service_mapping(
    [('/my_path', MyService),  # Maps to /my_path
     ('/my_other_path', MyOtherService),  # Maps to /my_other_path
    ])

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 .

Arguments

services
A list of tuples (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 .
registry_path = DEFAULT_REGISTRY_PATH
Path to provide to the registry service. Use None to disable registry service.

Returns a WSGI application with multiple service mappings with an optional registry service.

Raises a ServiceConfigurationError when duplicate paths are provided.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.