# ddnexus/pagy

Agnostic pagination in plain ruby

Repository: https://github.com/ddnexus/pagy
Canonical: https://ross.abutalabs.com/products/pagy
Homepage: https://ddnexus.github.io/pagy/
Language: Ruby
License: MIT
License Family: permissive
Topics: ruby, rails, sinatra, padrino, bootstrap, bulma, searchkick, elasticsearch-rails, hanami, jsonapi, meilisearch, typesense-rails
Last push: 2026-08-24T10:00:20+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 99, longevity 100
- inputs: {"age_days": 3167, "days_push": 9, "days_rel": 9, "gap_med": 3.5, "n_releases_24m": 59}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4988, forks 446 (observed 2026-08-28T04:09:04.265812+00:00)

## What it is
Pagy is a fast, framework-agnostic pagination library written in plain Ruby. It supports multiple pagination techniques (OFFSET, COUNTLESS, KEYSET, KEYNAV, SEARCH, CALENDAR) and integrates with Rails, Sinatra, Hanami, Padrino, and popular search gems.

## Use cases
- paginate large collections in a rails app
- add keyset pagination for fast deep-page navigation
- paginate elasticsearch or meilisearch search results
- render pagination UI with bootstrap or bulma
- paginate jsonapi responses in sinatra
- add calendar-based pagination for date ranges

## When to choose
- you need the fastest pagination gem for ruby web apps
- you want framework-agnostic pagination across rails, sinatra, or hanami
- you need keyset pagination to avoid slow OFFSET queries on large tables
- you paginate search engine results from elasticsearch, meilisearch, or typesense

## When to avoid
- your project is not in ruby
- you need a batteries-included full-stack framework rather than a pagination library
- you rely on legacy pagy APIs without planning an upgrade to version 43

## Facets
- artifact type: library
- maturity: active
- function: web-framework, search-engine, templating, ui-components, api-framework
- domain: web-development, backend, developer-tools
- platform: ruby, cross-platform
- tags: pagination, rails, sinatra, keyset-pagination, offset-pagination, elasticsearch, meilisearch, typesense, jsonapi, i18n, search, web-server

## Member repositories
- ddnexus/pagy (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:04.265812+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:17:40.167399+00:00, confidence not recorded.
  - readme: https://github.com/ddnexus/pagy (fetched 2026-08-28T04:09:04.265812+00:00, sha cb71b5fad742)
  - homepage: https://ddnexus.github.io/pagy/ (fetched 2026-08-29T08:58:41.240589+00:00, sha 58a0723699b3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
