--- id: paginate version: "0.5.7" license: MIT license_treatment: permissive maintenance: dormant --- # paginate — Divides large result sets into pages for easier browsing License: permissive · Maintenance: dormant · Downloads: 14.3M/mo ## 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 above — 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 pip install paginate uv add paginate poetry add paginate ## Installing 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: unspecified - Install friction: low - Maintenance: dormant - Downloads: 14.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags pagination library, divide results into pages, page navigation, paginate large lists, pagination markup generator, page links html, result set pagination, pagination, web-ui, query-results [View on SkillFed](https://skillfed.io/packages/paginate) · [View on PyPI](https://pypi.org/project/paginate/)