pypaginate.filtering.engine
Filter engine applying filter specs or nested groups to sequences.
Delegates to the native pypaginate._core engine. Accepts a flat
FilterSpec list (each spec’s logic honored, AND/OR) or a nested
FilterGroup built with the And / Or helpers — the core evaluates
the full And/Or tree and returns matching row indices.
Classes
Apply filter specifications to in-memory sequences via |
Module Contents
- class pypaginate.filtering.engine.FilterEngine
Apply filter specifications to in-memory sequences via
_core.- apply(items: collections.abc.Sequence[T], filters: collections.abc.Sequence[pypaginate.domain.specs.FilterSpec] | pypaginate.domain.specs.FilterGroup) list[T]
Apply filters to items. Accepts a flat list or a nested FilterGroup.
- Parameters:
items – Source sequence to filter.
filters – FilterSpec list or FilterGroup (via And/Or builders).
- Returns:
Filtered list of items matching the filter logic.