Skip to content

Sort

arapy.sort

Arabic alphabetical ordering.

ar_sort_key

ar_sort_key(
    text: str, *, normalizer: Normalizer = SORT
) -> tuple[str, str]

Key for Arabic alphabetical order. Ties between folded letters (أ/ا) break by spelling.

ar_sorted

ar_sorted(
    items: Iterable[str],
    *,
    normalizer: Normalizer = ...,
    reverse: bool = ...,
) -> list[str]
ar_sorted(
    items: Iterable[T],
    *,
    key: Callable[[T], str],
    normalizer: Normalizer = ...,
    reverse: bool = ...,
) -> list[T]
ar_sorted(
    items: Iterable[T],
    *,
    key: Callable[[T], str] = str,
    normalizer: Normalizer = SORT,
    reverse: bool = False,
) -> list[T]

Sort in Arabic alphabetical order; key picks the text to sort by from each item.