Skip to content

And filter

AndFilter #

AndFilter(filters: list[RapidataFilter])

Bases: RapidataFilter, BaseModel

A filter that combines multiple filters with a logical AND operation. This class implements a logical AND operation on a list of filters, where the condition is met if all of the filters' conditions are met.

Parameters:

Name Type Description Default
filters list[RapidataFilter]

A list of filters to be combined with AND.

required
Example
from rapidata import AndFilter, LanguageFilter, CountryFilter

AndFilter([LanguageFilter(["en"]), CountryFilter(["US"])])

This will match users who have their phone set to English AND are located in the United States.

Source code in src/rapidata/rapidata_client/filter/and_filter.py
def __init__(self, filters: list[RapidataFilter]):
    super().__init__(filters=filters)