ORIONIS API REFERENCE

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 toDict Serialize the page and its metadata into a dictionary.
Method toJson 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_page Undocumented
Instance Variable _total Undocumented
Property hasNext Report whether a page exists after the current one.
Property hasPrevious Report whether a page exists before the current one.
Property items Return the items for the current page.
Property lastPage Return the number of the last available page.
Property page Return the current page number.
Property perPage Return the configured page size.
Property total Return the total number of rows across all pages.
def __init__(self, items: Collection, total: int, page: int, per_page: int): (source)

Initialize the paginator with its items and metadata.

Parameters
items:CollectionItems for the current page.
total:intTotal number of rows across all pages.
page:intCurrent page number, starting at 1.
per_page:intNumber of items per page.
Returns
NoneThis method does not return a value.
Raises
ValueErrorIf the page or page size are not positive integers.
def __len__(self) -> int: (source)

Return the number of items in the current page.

Returns
intItem count of the current page.
def __repr__(self) -> str: (source)

Return a concise developer representation of the paginator.

Returns
strRepresentation including page, page size, and total.
def toDict(self) -> dict[str, Any]: (source)

Serialize the page and its metadata into a dictionary.

Returns
dictDictionary with items and pagination metadata.
def toJson(self, **kwargs: Any) -> str: (source)

Serialize the page and its metadata into a JSON string.

Parameters
**kwargs:AnyAdditional keyword arguments forwarded to json.dumps.
Returns
strJSON representation of the page.
__slots__: tuple[str, ...] = (source)

Undocumented

Undocumented

Undocumented

_per_page = (source)

Undocumented

Undocumented

Report whether a page exists after the current one.

Returns
boolTrue when the current page is not the last.

Report whether a page exists before the current one.

Returns
boolTrue when the current page is not the first.
items: Collection = (source)

Return the items for the current page.

Returns
CollectionItems of the current page.

Return the number of the last available page.

Returns
intLast page number, never lower than 1.

Return the current page number.

Returns
intCurrent page, starting at 1.

Return the configured page size.

Returns
intNumber of items per page.

Return the total number of rows across all pages.

Returns
intTotal row count.