Skip to main content

Module

Column wrapper for type-safe filtering and sorting.

Column

Wrapper for ColumnInfo that provides type-safe filtering and sorting. This class validates filter and sort operations based on the column’s data_type and sortable attributes, ensuring only valid operations are performed. Examples

after

Filter for dates after a value (exclusive). Arguments
  • value: The threshold date (string or datetime).

ascending

Sort in ascending order.

Returns

LogRecordsSortClause: A configured sort clause.

Raises

ValidationError: If the column is not sortable.

before

Filter for dates before a value (exclusive). Arguments
  • value: The threshold date (string or datetime).

between

Filter for numbers within a range (inclusive). Arguments
  • min_value: The minimum value (inclusive).
  • max_value: The maximum value (inclusive).

contains

Filter for text that contains a substring. Arguments
  • value: The substring to search for.
  • case_sensitive: Whether the search should be case-sensitive. Default is True.

descending

Sort in descending order.

Returns

LogRecordsSortClause: A configured sort clause.

Raises

ValidationError: If the column is not sortable.

equals

Filter for exact value match. For text columns, performs exact text matching. For boolean columns, performs boolean equality. Arguments
  • value: The value to match (string for text columns, boolean for boolean columns).
  • case_sensitive: Whether text matching should be case-sensitive. Default is True. Ignored for boolean columns.

greater_than

Filter for numbers greater than a value. Arguments
  • value: The threshold value (exclusive).

greater_than_or_equal

Filter for numbers greater than or equal to a value. Arguments
  • value: The threshold value (inclusive).

is_false

Filter for boolean columns that are False. Examples

is_true

Filter for boolean columns that are True. Examples

less_than

Filter for numbers less than a value. Arguments
  • value: The threshold value (exclusive).

less_than_or_equal

Filter for numbers less than or equal to a value. Arguments
  • value: The threshold value (inclusive).

not_equals

Filter for text that does not match. Arguments
  • value: The text value to exclude.
  • case_sensitive: Whether the match should be case-sensitive. Default is True.

not_in

Filter for text that does not match any value in a list. Arguments
  • values: List of text values to exclude.
  • case_sensitive: Whether the match should be case-sensitive. Default is True.

on_or_after

Filter for dates on or after a value (inclusive). Arguments
  • value: The threshold date (string or datetime).

on_or_before

Filter for dates on or before a value (inclusive). Arguments
  • value: The threshold date (string or datetime).

one_of

Filter for text that matches any value in a list. Arguments
  • values: List of text values to match.
  • case_sensitive: Whether the match should be case-sensitive. Default is True.

ColumnCollection

A dictionary-like collection of Column objects for easy access by column ID. This class provides convenient access to columns using dictionary syntax, while also supporting iteration and other collection operations. Inherits from Mapping[str, Column] to provide a read-only mapping interface. Examples