google.appengine.api.modules.get_hostname

Returns a hostname to use to contact the module.

module Name of module, if None, take module of the current instance.
version Name of version, if version is None then either use the version of the current instance if that version exists for the target module, otherwise use the default version of the target module.
instance Instance to construct a hostname for, if instance is None, a loadbalanced hostname for the module will be returned. If the target module is not a fixed module, then instance is not considered valid.

A valid canonical hostname that can be used to communicate with the given module/version/instance. For example: 0.v1.module5.myapp.appspot.com

InvalidModuleError if the given module version is invalid.
InvalidInstancesError if the given instance value is invalid.
TypeError if the given instance type is invalid.