pypaginate.query
One-shot filter / sort / search over in-memory sequences.
The ergonomic complement to :func:pypaginate.paginate: filter, sort, or search
a list directly through the native engine. Each returns a new list of matching
host items (search in ranked relevance order).
FilterWhere
A single spec, a sequence of them (each keeps its own logic), or a group.
SortBy
A single sort key or a sequence applied in priority order.
filter
def filter(items: Sequence[ItemT], where: FilterWhere) -> list[ItemT]
Return the items matching where, in original order.
sort
def sort(items: Sequence[ItemT], by: SortBy) -> list[ItemT]
Return the items ordered by by (stable, null-aware).
search
def search(items: Sequence[ItemT], spec: SearchSpec) -> list[ItemT]
Return the items matching spec in ranked (relevance) order.