

def __init__(self, items, total, per_page, current_page=None, options=None):
    '\n        Constructor\n\n        :param items: The items being paginated\n        :type items: mixed\n\n        :param total: Total number of results\n        :type total: int\n\n        :param per_page: The number of results per page\n        :type per_page: int\n\n        :param current_page: The current page of results\n        :type current_page: int\n\n        :param options: Extra options to set\n        :type options: dict\n        '
    if (options is not None):
        for (key, value) in options.items():
            setattr(self, key, value)
    self.total = total
    self.per_page = per_page
    self.last_page = int(math.ceil((total / per_page)))
    self.current_page = self._set_current_page(current_page, self.last_page)
    if isinstance(items, Collection):
        self._items = items
    else:
        self._items = Collection.make(items)

dataset/ETHPy150Open sdispater/orator/orator/pagination/length_aware_paginator.py LengthAwarePaginator.__init__/original