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 generally available.

google.appengine.api.datastore_types.ValidateInteger

Raises an exception if value is not a valid integer.

An integer is valid if it's not negative or empty and is an integer (either int or long). The exception type raised can be specified with the exception argument; it defaults to BadValueError.

value The value to validate.
name The name of this value; used in the exception message.
exception The type of exception to raise.
empty_ok Allow None value.
zero_ok Allow zero value.
negative_ok Allow negative value.