# uriyyo/fastapi-pagination

FastAPI pagination 📖

Repository: https://github.com/uriyyo/fastapi-pagination
Canonical: https://ross.abutalabs.com/products/fastapi-pagination
Homepage: https://uriyyo-fastapi-pagination.netlify.app/
Language: Python
License: MIT
License Family: permissive
Topics: fastapi, fastapi-sqlalchemy, fastapi-pagination, pagination, gino
Last push: 2026-08-26T03:10:55+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 95, longevity 100
- inputs: {"age_days": 2126, "days_push": 7, "days_rel": 36, "gap_med": 13, "n_releases_24m": 36}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1680, forks 163 (observed 2026-08-28T04:05:21.473333+00:00)

## What it is
A Python library that adds pagination support to FastAPI applications. It provides utility functions and data models (like Page) to paginate database queries and return paginated responses, supporting cursor-based and page-based strategies with SQLAlchemy, Tortoise ORM, PyMongo, and more.

## Use cases
- paginate list endpoints in a FastAPI app
- add page-based pagination to API responses
- implement cursor-based pagination for large datasets
- paginate SQLAlchemy query results in FastAPI
- return paginated JSON with page metadata from endpoints
- add limit/offset query parameters to FastAPI routes

## When to choose
- you are building APIs with FastAPI and need consistent paginated responses
- you want drop-in pagination across multiple ORMs like SQLAlchemy, Tortoise, or PyMongo
- you need both cursor-based and page-based pagination strategies
- your project uses async/await with Python 3.10+

## When to avoid
- you are not using FastAPI
- you need pagination in a framework other than FastAPI (e.g., Django, Flask)
- you require highly custom pagination schemes the library's strategies don't cover

## Facets
- artifact type: library
- maturity: active
- function: web-framework, middleware, serialization
- domain: web-development, backend, apis, databases
- platform: python, cross-platform
- tags: fastapi, pagination, sqlalchemy, async, cursor-pagination, page-based-pagination

## Member repositories
- uriyyo/fastapi-pagination (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:21.473333+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-30T03:41:29.529235+00:00, confidence not recorded.
  - readme: https://github.com/uriyyo/fastapi-pagination (fetched 2026-08-28T04:05:21.473333+00:00, sha 7c872b0a91fb)
  - homepage: https://uriyyo-fastapi-pagination.netlify.app/ (fetched 2026-08-29T11:14:42.402938+00:00, sha c071ea14d4a4)
  - registry_pypi: https://pypi.org/pypi/fastapi-pagination/json (fetched 2026-08-29T11:14:42.412296+00:00, sha 3c754825bc9c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
