Module
Declarative filter builders for SDK queries.Filter
Base class for declarative filter construction. This class defines the interface for building type-safe filters that can be used with LogStream queries and other SDK operations.TextFilter
Builder for text-based filters. Supports operators: equals, not_equals, contains, one_of, not_in Examples text(“input”).equals(“hello”) text(“status”).contains(“error”) text(“name”).one_of([“Alice”, “Bob”])contains
value: The substring to search for.
equals
value: The text value to match.
not_equals
value: The text value to exclude.
not_in
values: List of text values to exclude.
one_of
values: List of text values to match.
NumberFilter
Builder for number-based filters. Supports operators: equals, not_equals, greater_than, greater_than_or_equal, less_than, less_than_or_equal, between Examples number(“score”).greater_than(0.8) number(“count”).between(10, 100) number(“rating”).equals(5)between
min_value: The minimum value (inclusive).max_value: The maximum value (inclusive).
equals
value: The number to match.
greater_than
value: The threshold value (exclusive).
greater_than_or_equal
value: The threshold value (inclusive).
less_than
value: The threshold value (exclusive).
less_than_or_equal
value: The threshold value (inclusive).
not_equals
value: The number to exclude.
DateFilter
Builder for date-based filters. Supports operators: equals, not_equals, before, after, on_or_before, on_or_after Examples date(“created_at”).after(“2024-01-01”) date(“updated_at”).before(datetime.now()) date(“published_at”).on_or_after(“2024-01-01”)after
value: The threshold date (string or datetime).
before
value: The threshold date (string or datetime).
equals
value: The date to match (string or datetime).
not_equals
value: The date to exclude (string or datetime).
on_or_after
value: The threshold date (string or datetime).
on_or_before
value: The threshold date (string or datetime).
BooleanFilter
Builder for boolean-based filters. Boolean filters are simple equality checks - there are no operators, just matching against true or false values. Examples boolean(“is_active”).is_true() boolean(“has_error”).is_false() boolean(“enabled”).equals(True)equals
value: The boolean value to match (True or False).
is_false
Returns
LogRecordsBooleanFilter: A configured boolean filter for False.is_true
Returns
LogRecordsBooleanFilter: A configured boolean filter for True.boolean
column_id: The ID of the column to filter on.
date
column_id: The ID of the column to filter on.
number
column_id: The ID of the column to filter on.
text
column_id: The ID of the column to filter on.case_sensitive: Whether the filter should be case-sensitive. Default is True.