from posthog.models import Filter filter = Filter(data={ 'start_date' : '2022-01-01', 'end_date' : '2022-01-31' })
from posthog.models import Filter filter = Filter(data={ 'date_from': '2022-01-01T00:00:00.000Z', 'date_to': '2022-01-07T23:59:59.999Z' })This code creates a new Filter object and sets the range as Jan.1, 2022 - Jan. 7, 2022. In both examples, the Filter object takes in a dictionary of data that includes a start date and an end date or a date_from and date_to. These values are used to filter data in PostHog.