WebApp Service Handlers Stay organized with collections Save and categorize content based on your preferences.
This feature is deprecated. You should use the newerWSGI Service Library to publish the service as a WSGI application.
This module contains classes that publish a Google Protocol RPC service using the App Engine Webapp framework.
Theprotorpc.webapp.service_handlers package provides the following functions:
- service_mapping(services,registry_path=DEFAULT_REGISTRY_PATH)
Creates a services mapping for use with webapp.
Creates basic default configuration and registration for Google Protocol RPC 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:
fromprotorpcimportremotefromprotorpc.webappimportservice_handlerspackage='my_package'classMyService(remote.Service):...service_handlers.service_mapping([('/my_path',MyService),# Maps to /my_pathMyService,# 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 seeremote.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- services
- A tuple (path, service), where
pathis the path where the service resides, andserviceis the service class or service factory for creating new instances of the service. For more information about service factories, please seeremote.Service.new_factory. - registry_path=DEFAULT_REGISTRY_PATH
- Path to provide to the registry service. Use None to disable registry service.
Returns a list of tuples defining a mapping of request handlers compatible with aWebApp application.
Raises a ServiceConfigurationError when duplicate paths are provided.
- run_services(services,registry_path=DEFAULT_REGISTRY_PATH)
Handles CGI request using service mapping.
Arguments- services
- A tuple (path, service), where
pathis the path where the service resides, andserviceis the service class or service factory for creating new instances of the service. For more information about service factories, please seeremote.Service.new_factory. - registry_path=DEFAULT_REGISTRY_PATH
- Path to provide to the registry service. Use None to disable registry service.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.