THE ORIONIS API
Build with clarity.
Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.
class documentation
Length-aware page of query results.
Wraps a Collection of items together with the pagination
metadata required to render page controls: total row count, current
page, page size, and derived navigation flags.
| Method | __init__ |
Initialize the paginator with its items and metadata. |
| Method | __len__ |
Return the number of items in the current page. |
| Method | __repr__ |
Return a concise developer representation of the paginator. |
| Method | to |
Serialize the page and its metadata into a dictionary. |
| Method | to |
Serialize the page and its metadata into a JSON string. |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | _items |
Undocumented |
| Instance Variable | _page |
Undocumented |
| Instance Variable | _per |
Undocumented |
| Instance Variable | _total |
Undocumented |
| Property | has |
Report whether a page exists after the current one. |
| Property | has |
Report whether a page exists before the current one. |
| Property | items |
Return the items for the current page. |
| Property | last |
Return the number of the last available page. |
| Property | page |
Return the current page number. |
| Property | per |
Return the configured page size. |
| Property | total |
Return the total number of rows across all pages. |
Initialize the paginator with its items and metadata.
| Parameters | |
items:Collection | Items for the current page. |
total:int | Total number of rows across all pages. |
page:int | Current page number, starting at 1. |
perint | Number of items per page. |
| Returns | |
None | This method does not return a value. |
| Raises | |
ValueError | If the page or page size are not positive integers. |
Return a concise developer representation of the paginator.
| Returns | |
str | Representation including page, page size, and total. |
Serialize the page and its metadata into a dictionary.
| Returns | |
dict | Dictionary with items and pagination metadata. |
Serialize the page and its metadata into a JSON string.
| Parameters | |
**kwargs:Any | Additional keyword arguments forwarded to json.dumps. |
| Returns | |
str | JSON representation of the page. |
Report whether a page exists after the current one.
| Returns | |
bool | True when the current page is not the last. |
Report whether a page exists before the current one.
| Returns | |
bool | True when the current page is not the first. |