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
OffsetLimitrequests andPaginatedResponse
📦 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 provideDataSourceexamples for Django QuerySets. -
Tortoise ORM support
Assess API compatibility and document usage patterns. -
Cursor-based pagination
AddCursorPaginatorandCursorPaginatedResponseas an alternative to offset/limit (for better performance on large datasets).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33d8da54ed3c6f8d25a5c4e5d5379658af10e31de4ccbb4cc7f02084b036f11c
|
|
| MD5 |
4a8dcab95a71d9488e4e062d4a73ee34
|
|
| BLAKE2b-256 |
b3af52ed462943f3db80962307dd4685f86f1062f7bb640b0a33837dd363b410
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
617b83ce9e53385e10fe68001045996b917b913998ddc3440a3437e4f0d31673
|
|
| MD5 |
53877658e3c004784b8a4aec65807511
|
|
| BLAKE2b-256 |
4d582a3c00bc36041efec24645bb7c5d33eb60be5c8305fff6cfa01c32c7a9a5
|