google.appengine.api.namespace_manager.namespace_manager module

Summary

Control the namespacing system used by various APIs.

A namespace may be specified in various API calls exemplified by the datastore and memcache interfaces. The default can be specified using this module.

Contents

exception google.appengine.api.namespace_manager.namespace_manager.BadValueErrorsource

Bases: exceptions.Exception

Raised by ValidateNamespaceString.

google.appengine.api.namespace_manager.namespace_manager.set_namespace(namespace)source

Set the default namespace for the current HTTP request.

Args:
namespace: A string naming the new namespace to use. A value of None

will unset the default namespace value.

google.appengine.api.namespace_manager.namespace_manager.get_namespace()source

Get the current default namespace or ('') namespace if unset.

google.appengine.api.namespace_manager.namespace_manager.google_apps_namespace()source
google.appengine.api.namespace_manager.namespace_manager.enable_request_namespace()source

Set the default namespace to the Google Apps domain referring this request.

This method is deprecated, use lib_config instead.

Calling this function will set the default namespace to the Google Apps domain that was used to create the url used for this request and only for the current request and only if the current default namespace is unset.

google.appengine.api.namespace_manager.namespace_manager.validate_namespace(value, exception=google.appengine.api.namespace_manager.namespace_manager.BadValueError)source

Raises an exception if value is not a valid Namespace string.

A namespace must match the regular expression ([0-9A-Za-z._-]{0,100}).

Args:

value: string, the value to validate. exception: exception type to raise.

Send feedback about...