Metadata-Version: 2.4
Name: pagi
Version: 0.1.0
Summary: ORM-agnostic pagination toolkit for Python
Author-email: Daryll Lorenzo Alfonso <daryllla77@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/DaryllLorenzo/pagi
Project-URL: Repository, https://github.com/DaryllLorenzo/pagi
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: build>=1.3.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Dynamic: license-file

# 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**
```bash
pip install pagi
# or with uv
uv pip install pagi
```

## Roadmap

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

- [x] **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).

