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.


Constructs a FilterPredicate from the given name, op and values.

name A non-empty string, the name of the property to filter.
op One of PropertyFilter._OPERATORS.keys(), the operator to use.
values A supported value, the value to compare against.

if values is a list, a CompositeFilter that uses AND to combine all values, otherwise a PropertyFilter for the single value.

datastore_errors.BadPropertyError if the property name is invalid.
datastore_errors.BadValueError if the property did not validate correctly or the value was an empty list. Other exception types (like OverflowError): if the property value does not meet type-specific criteria.