Python 3.9 is now generally available.


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'