Google Code offered in: English - Español - 日本語 - 한국어 - Português - Pусский - 中文(简体) - 中文(繁體)
This Backends API allows you to retrieve information about the backend handling the current request, and compute the URL and hostname of any other backend or backend instance within the same application. The methods in this API work in both production and the development server.
The google.appengine.api.backends
package provides the following functions:
Gets the name (BACKEND_ID
) of the backend handling the current request. Returns None
if the request is not handled by a backend.
Returns the hostname of the backend or backend instance.
backend=None
returns the current backend; this is the default behavior.Gets the id (INSTANCE_ID
) for the instance handling the current request. Returns the instance ID (numbering starts at 0
), or None
if the request is not handled by a backend.
Gets the address of a specific backend. Returns a local address if run in the development server, or a production address if run in production. Returns the HTTP or HTTPS address of a specific backend.
Arguments:
backend=None
returns the current backend; this is the default behavior.HTTP
(default) or HTTPS
. The development server supports only HTTP
. Production supports both HTTP
and HTTPS
. Raises the InvalidBackendError if the provided backend cannot be found.