Filters¶
predicate
¶
Predicate
¶
Bases: ABC
Base class for filter predicates that serialize to VNDB's filter DSL.
to_filter
abstractmethod
¶
to_filter() -> list[Any]
Serialize this predicate to VNDB's nested-list filter form.
Comparison
¶
Comparison(name: str, op: str, value: Any)
Field
¶
Field(name: str)
A filterable field; comparison operators build :class:Comparisons.
Because &/| bind looser than comparison operators in Python, wrap each
comparison in parentheses when composing: (f.rating >= 80) & (f.lang == "en").
Instances are immutable: namespace fields (e.g. vn_filters.rating) are shared
singletons, so rebinding .name is blocked to avoid corrupting them globally.