Skip to main content

ORM-agnostic pagination toolkit for Python

Project description

pagi

A minimal, ORM-agnostic pagination toolkit for Python.
Define your pagination logic once, and paginate efficiently with SQLAlchemy, Django, raw SQL, or any data source — all wrapped in typed Pydantic models.

Features

  • ✅ Pydantic v2 models for OffsetLimit requests and PaginatedResponse

📦 Install

pip install pagi
# or with uv
uv pip install pagi

Roadmap

Here’s what’s planned — contributions are welcome!

  • Create repository and basic models

  • SQLAlchemy integration
    Implement strategy pattern to support both async and sync sessions

  • Django ORM support
    Evaluate feasibility and provide DataSource examples for Django QuerySets.

  • Tortoise ORM support
    Assess API compatibility and document usage patterns.

  • Cursor-based pagination
    Add CursorPaginator and CursorPaginatedResponse as an alternative to offset/limit (for better performance on large datasets).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pagi-0.1.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pagi-0.1.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file pagi-0.1.0.tar.gz.

File metadata

  • Download URL: pagi-0.1.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pagi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 33d8da54ed3c6f8d25a5c4e5d5379658af10e31de4ccbb4cc7f02084b036f11c
MD5 4a8dcab95a71d9488e4e062d4a73ee34
BLAKE2b-256 b3af52ed462943f3db80962307dd4685f86f1062f7bb640b0a33837dd363b410

See more details on using hashes here.

File details

Details for the file pagi-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pagi-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pagi-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 617b83ce9e53385e10fe68001045996b917b913998ddc3440a3437e4f0d31673
MD5 53877658e3c004784b8a4aec65807511
BLAKE2b-256 4d582a3c00bc36041efec24645bb7c5d33eb60be5c8305fff6cfa01c32c7a9a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page