The Paginator class is accessible via the webhelpers.pagination module.
The Paginator tracks data associated with pagination of groups of data, as well as supplying objects and methods that make dealing with paginated results easier.
A Paginator supports list operations, including item fetching, length, iteration, and the 'in' operation. Each item in the Paginator is a Page object representing data about that specific page in the set of paginated data. As with the standard Python list, the Paginator list index starts at 0.
Page object currently being displayed
When assigning to the current page, it will set the page number for this page and create it if needed. If the page is a Page object and does not belong to this paginator, an AttributeError will be raised.
Initialize a Paginator with the item count specified.
See the source for more information.