Skip to main content
atoti.Ordering(
    *,
    direction: Literal[‘ascending’, ‘descending’] = 'ascending',
    first: Sequence[bool | int | float | date | datetime | time | str] = (),
    string_comparison: StringComparison = StringComparison(case='sensitive', digits='lexicographic'),
)
The order in which elements are sorted.
Ascending direction:
Descending direction:
Forcing some elements first:
first cannot be combined with the other attributes yet:
Added in version 6.2.1.

Attributes

direction

Direction in which the elements are sorted.
  • "ascending": from the smallest to the greatest element.
  • "descending": from the greatest to the smallest element.

first

Elements to always sort first, in the given order.

string_comparison

StringComparison