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.


An immutable filter predicate that combines other predicates.

Inherits From: FilterPredicate, expected_type

This class proactively merges sub-filters that are combined using the same operator. For example: CompositeFilter(AND, [f1, f2, CompositeFilter(AND, [f3, f4]), f5, f6]) is equivalent to: CompositeFilter(AND, [f1, f2, f3, f4, f5, f6])

Currently filters can only be combined using an AND operator.

op The operator to use to combine the given filters
filters A list of one or more filters to combine

datastore_errors.BadArgumentError if op is not in CompsiteFilter.OPERATORS or filters is not a non-empty list containing only FilterPredicates.





View source

Applies the filter predicate to the given entity.

entity the datastore_pb.EntityProto to test.

True if the given entity matches the filter, False otherwise.


View source

Return self==value.


View source

Return self!=value.

AND 'and'