vantage6.backend.common.resource.pagination.Page

class Page(items, page, page_size, total)

Bases: object

Definition of a page of items return by the API.

Parameters:
  • items (list[DeclarativeMeta]) – List of database resources on this page

  • page (int) – Current page number

  • page_size (int) – Number of items per page

  • total (int) – Total number of items

Variables:
  • current_page (int) – Current page number

  • items (list[DeclarativeMeta]) – List of resources on the current page

  • previous_page (int) – Page number of the previous page

  • next_page (int) – Page number of the next page

  • has_previous (bool) – True if there is a previous page, False otherwise

  • has_next (bool) – True if there is a next page, False otherwise

  • total (int) – Total number of items

  • pages (int) – Total number of pages

__init__(items, page, page_size, total)

Methods

__init__(items, page, page_size, total)