Operators

OperatorDescription
||Logical OR operation.
&&Logical AND operation.
==Check if a is equal to b.
!=Check if a is not equal to b.
<Check if a is less than b.
<=Check if a is less than or equal to b.
>Check if a is greater than b.
>=Check if a is greater than or equal to b.
+Add two numbers together.
-Subtract second number from first number.
*Multiply two numbers together.
/Divide first number by second number.
%Calculate modulo (remainder) of first number divided by second.
!Logical NOT operation.

Functions

FunctionArgumentsDescription
slice(x: str, start_index: int, length: int) -> strExtract a substring from start_index with given length.
less_than(a: Any, b: Any) -> boolCheck if a is less than b.
less_than_or_equal(a: Any, b: Any) -> boolCheck if a is less than or equal to b.
greater_than(a: Any, b: Any) -> boolCheck if a is greater than b.
greater_than_or_equal(a: Any, b: Any) -> boolCheck if a is greater than or equal to b.
not_equal(a: Any, b: Any) -> boolCheck if a is not equal to b.
is_equal(a: Any, b: Any) -> boolCheck if a is equal to b.
not_null(x: Any) -> boolCheck if value is not None.
is_null(x: Any) -> boolCheck if value is None.
regex_extract(pattern: str, text: str) -> strExtract first match of regex pattern from text.
regex_match(pattern: str, text: str) -> boolCheck if text matches regex pattern.
regex_not_match(pattern: str, text: str) -> boolCheck if text does not match regex pattern.
contains(item: Any, container: Sequence[Any]) -> boolCheck if item exists in container.
does_not_contain(item: Any, container: Sequence[Any]) -> boolCheck if item does not exist in container.
length(obj, /)Return the number of items in a container.
is_empty(x: Sequence[Any]) -> boolCheck if sequence is empty.
not_empty(x: Sequence[Any]) -> boolCheck if sequence is not empty.
flatten(iterables: Sequence[Sequence[Any]]) -> list[Any]Flatten nested sequences into a single list.
unique(items: Sequence[Any]) -> list[Any]Return unique items from sequence.
add(a: float | int, b: float | int) -> float | intAdd two numbers together.
sub(a: float | int, b: float | int) -> float | intSubtract second number from first number.
mul(a: float | int, b: float | int) -> float | intMultiply two numbers together.
div(a: float | int, b: float | int) -> floatDivide first number by second number.
mod(a: float | int, b: float | int) -> float | intCalculate modulo (remainder) of first number divided by second.
pow(a: float | int, b: float | int) -> float | intRaise first number to the power of second number.
sum(iterable: Iterable[float | int], start: float | int = 0) -> float | intReturn the sum of a ‘start’ value (default: 0) plus an iterable of numbers.
join(items: Sequence[str], sep: str) -> strJoin sequence of strings with separator.
concat(*items: str) -> strConcatenate multiple strings.
format(template: str, *values: Any) -> strFormat a string with the given arguments.
filter(items: list[T], constraint: str | list[T] | FunctionConstraint | OperatorConstraint) -> list[T]Custom collection filter with support for jsonpath, lambda expressions and operators.
jsonpath(expr: str, operand: dict[str, Any], *, context_type: ExprContext | None = None, strict: bool = False) -> T | NoneEvaluate a jsonpath expression on the target object (operand).
zip(*iterables: Sequence[Any]) -> list[tuple[Any, …]]Zip multiple sequences together.
iter_product(*iterables: Sequence[Any]) -> list[tuple[Any, …]]Generate cartesian product of sequences.
uuid4() -> strGenerate a random UUID string.
to_keys(x: dict[Any, Any]) -> list[Any]Extract keys from dictionary.
to_values(x: dict[Any, Any]) -> list[Any]Extract values from dictionary.
and(a: bool, b: bool) -> boolLogical AND operation.
or(a: bool, b: bool) -> boolLogical OR operation.
not(x: bool) -> boolLogical NOT operation.
serialize_json(x: Any) -> strConvert object to JSON string.
deserialize_json(obj, /)Deserialize JSON to Python objects.
prettify_json(x: Any) -> strConvert object to formatted JSON string.
deserialize_ndjson(x: str) -> list[dict[str, Any]]Parse newline-delimited JSON string into list of dictionaries.
extract_text_from_html(input: str) -> list[str]Extract text content from HTML string using HTMLToTextParser.
from_timestamp(x: int, unit: str) -> datetimeConvert timestamp to datetime, handling milliseconds if unit is ‘ms’.
to_timestamp(x: datetime) -> floatConvert datetime to timestamp.
minutes(x: int) -> timedeltaCreate timedelta with specified minutes.
now() -> datetimeReturn the current datetime.
to_datestring(x: datetime, format: str) -> strFormat datetime to string using specified format.
to_datetime(x: Any) -> datetimeConvert input to datetime object from timestamp, ISO string or existing datetime.
to_isoformat(x: datetime) -> strConvert datetime to ISO format string.
to_base64(x: str) -> strEncode string to base64.
from_base64(x: str) -> strDecode base64 string to string.
lookup(d: dict[Any, Any], k: Any) -> AnySafely get value from dictionary.
ipv4_in_subnet(ipv4: str, subnet: str) -> boolCheck if IPv4 address is in the given subnet.
ipv6_in_subnet(ipv6: str, subnet: str) -> boolCheck if IPv6 address is in the given subnet.
ipv4_is_public(ipv4: str) -> boolCheck if IPv4 address is public/global.
ipv6_is_public(ipv6: str) -> boolCheck if IPv6 address is public/global.
check_ip_version(ip: str) -> intGet IP address version (4 or 6).