Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products.

Python 3.10 is now available in preview.

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.