paginate
Divides large result sets into pages for easier browsing
What it is and what it does
Paginate is a framework-agnostic pagination library that breaks large lists or query results into fixed-size pages. It provides a Page class that manages page state, calculates ranges, and generates HTML markup or link metadata for navigation controls. The library supports customization through wrapper classes to work with different data sources (lists, SQLAlchemy queries, Elasticsearch results) and allows you to override link generation and HTML formatting to match your template or UI framework.
Originally part of WebHelpers and tightly coupled to Pylons, this standalone version aims to work independently of any web framework. It handles the math of pagination—calculating which items belong on each page, generating first/previous/next/last links, and optionally rendering HTML with configurable attributes. You can either use the built-in pager() method to generate HTML directly or call link_map() to get a dictionary of link information for use in custom templates.
Use it for:
- Display search results 10 at a time with first/previous/next/last navigation links in a web application
- Paginate database query results without loading the entire result set into memory by wrapping the query object
- Generate pagination UI for a REST API that returns large lists, using link_map() to build custom JSON responses
- Build custom pagination markup for Bootstrap or Tailwind by passing a link_tag callable to override default HTML generation
- Extend the Page class to paginate results from Elasticsearch, Solr, or other datastores via a custom wrapper class
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Divides large lists or query results into manageable pages, handling navigation between pages and generating pagination UI markup or link metadata.
Yes, if you need simple, framework-agnostic pagination for lists or query results and can accept dormant maintenance. The library has no dependencies, low install friction, and a permissive license. However, verify compatibility with your Python version before relying on it in new projects, given the lack of recent updates and unspecified Python support.
Install
paginate on PyPI
pip
pip install paginateuv
uv add paginatepoetry
poetry add paginateInstalling paginate
Before you install
Low install friction; no runtime dependencies. Dormant maintenance status—last release was 719 days ago, though the repository remains active with 79 stars and no recent commits.
License in practice
MIT license (permissive); you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
from paginate import Page
p = Page(items, page=1, items_per_page=10, item_count=len(items))
html = p.pager(pattern='$link_first $link_previous ~2~ $link_next $link_last', url='http://example.com?page=$page')
Verify before relying
- Whether the package works reliably with modern Python versions (requires_python is unspecified in metadata)
- Current state of the repository and whether dormancy indicates abandonment or stable maturity
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 719 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 14,325,648/month — #1,235 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: paginate-0.5.7-py2.py3-none-any.whl
Keywords: pagination, paginate, pages
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
django-admin-inline-paginatorAdds pagination controls to Django admin inline…
permissive · top 5,000 on PyPI
flask-paginateAdds pagination UI components to Flask…
permissive · top 15,000 on PyPI
django-admin-inline-paginator-plusAdds pagination to Django admin inline forms,…
permissive · top 15,000 on PyPI
fastapi-paginationAdds pagination support to FastAPI applications…
permissive · top 5,000 on PyPI
django-navhelperProvides Django template tags to automatically…
permissive · top 15,000 on PyPI
Bootstrap-FlaskBootstrap-Flask provides Jinja macros that…
permissive · top 15,000 on PyPI
mkdocs-awesome-pages-pluginA plugin for MkDocs that lets you customize…
permissive · top 5,000 on PyPI
Flask-AutoIndexFlask-AutoIndex generates directory listing…
permissive · top 15,000 on PyPI
trame-routerAdds multi-page navigation to trame…
permissive · top 15,000 on PyPI
weasyprintWeasyPrint converts HTML and CSS into PDF…
permissive · top 1,000 on PyPI