Parts

aiogram.utils.parts.split_text(text: str, length: int = 4096) → List[str][source]

Split long text

Parameters
  • text

  • length

Returns

list of parts

Return type

typing.List[str]

aiogram.utils.parts.safe_split_text(text: str, length: int = 4096) → List[str][source]

Split long text

Parameters
  • text

  • length

Returns

aiogram.utils.parts.paginate(data: Iterable, page: int = 0, limit: int = 10) → Iterable[source]

Slice data over pages

Parameters
  • data (typing.Iterable) – any iterable object

  • page (int) – number of page

  • limit (int) – items per page

Returns

sliced object

Return type

typing.Iterable