loadero_python.resources.pagination module

Loadero resource pagination.

Pagination describes and provides a way to manage large read all operation responses

class loadero_python.resources.pagination.PagedResponse(resource_params_class: type)[source]

Bases: LoaderoResourceParams

PagedResponse is a generic representation of Loadero read all responses.

property filter: Dict[any, any]

Filters applied in request. Filter keys and values are NOT parsed to their python types.

Returns:

Dict[any, any]: Filters.

property pagination: PaginationParams

Pagination information of request results.

Returns:

PaginationParams: Pagination params.

property results: List[LoaderoResourceParams]

Request results.

Returns:

List[LoaderoResourceParams]: Results.

class loadero_python.resources.pagination.PaginationParams[source]

Bases: LoaderoResourceParams

PaginationParams describes Loadero pagination attributes.

property limit: int

Maximum number of items to returned per page.

Returns:

int: Maximum number of items to returned per page.

property offset: int

Offset of the first item to in page.

Returns:

int: Offset of the first item to return.

property page: int

Index of the returned page.

Returns:

int: Index of the returned page.

property total_items: int

Total number of items.

Returns:

int: Total number of items.

property total_pages: int

Total number of pages.

Returns:

int: Total number of pages.