FilterOps

Methods

MethodDescription
all
any
avg
containsReturns a filter expression that checks whether the property's
ends_withReturns a filter expression that checks whether the property's
first
fuzzy_searchReturns a filter expression that performs fuzzy matching
is_inReturns a filter expression that checks whether the property
is_noneReturns a filter expression that checks whether the property
is_not_inReturns a filter expression that checks whether the property
is_someReturns a filter expression that checks whether the property
last
len
max
min
not_containsReturns a filter expression that checks whether the property's
starts_withReturns a filter expression that checks whether the property's
sum

Method Details

all

any

avg

contains

Signature: contains(value)

Returns a filter expression that checks whether the property's string representation contains the given value.

Parameters

NameTypeDefaultDescription
valueProp-Substring that must appear within the value.

Returns

TypeDescription
filter.FilterExprA filter expression evaluating substring search.

ends_with

Signature: ends_with(value)

Returns a filter expression that checks whether the property's string representation ends with the given value.

Parameters

NameTypeDefaultDescription
valueProp-Suffix to check for.

Returns

TypeDescription
filter.FilterExprA filter expression evaluating suffix matching.

first

Signature: fuzzy_search(prop_value, levenshtein_distance, prefix_match)

Returns a filter expression that performs fuzzy matching against the property's string value.

Uses a specified Levenshtein distance and optional prefix matching.

Parameters

NameTypeDefaultDescription
prop_valuestr-String to approximately match against.
levenshtein_distanceint-Maximum allowed Levenshtein distance.
prefix_matchbool-Whether to require a matching prefix.

Returns

TypeDescription
filter.FilterExprA filter expression performing approximate text matching.

is_in

Signature: is_in(values)

Returns a filter expression that checks whether the property is contained within the specified iterable of values.

Parameters

NameTypeDefaultDescription
valueslist[Prop]-Iterable of property values to match against.

Returns

TypeDescription
filter.FilterExprA filter expression evaluating membership.

is_none

Returns a filter expression that checks whether the property value is None / missing.

Returns

TypeDescription
filter.FilterExprA filter expression evaluating value is None.

is_not_in

Signature: is_not_in(values)

Returns a filter expression that checks whether the property is not contained within the specified iterable of values.

Parameters

NameTypeDefaultDescription
valueslist[Prop]-Iterable of property values to exclude.

Returns

TypeDescription
filter.FilterExprA filter expression evaluating non-membership.

is_some

Returns a filter expression that checks whether the property value is present (not None).

Returns

TypeDescription
filter.FilterExprA filter expression evaluating value is not None.

last

len

max

min

not_contains

Signature: not_contains(value)

Returns a filter expression that checks whether the property's string representation does not contain the given value.

Parameters

NameTypeDefaultDescription
valueProp-Substring that must not appear within the value.

Returns

TypeDescription
filter.FilterExprA filter expression evaluating substring exclusion.

starts_with

Signature: starts_with(value)

Returns a filter expression that checks whether the property's string representation starts with the given value.

Parameters

NameTypeDefaultDescription
valueProp-Prefix to check for.

Returns

TypeDescription
filter.FilterExprA filter expression evaluating prefix matching.

sum