Skip to main content

fast-pager

PyPI version CI Docs

Turn your Pydantic models into filterable, sortable, paginated FastAPI query parameters — automatically.

fast-pager reads the Pydantic models you already use in your FastAPI routes and generates type-safe query parameters for filtering, sorting and pagination. Those parameters show up in your OpenAPI docs for free, and compile down to a real database query (MongoDB first, more backends later).

class User(BaseModel):
    name: str
    age: int

@app.get("/users")
async def list_users(q: FilterQuery[User] = FilterDepends(User)):
    return await db.users.find(q.to_mongo()).to_list(None)

A request to:

GET /users?name__contains=ana&age__gte=21&age__lt=65&sort=-age&limit=20

…compiles to:

{"name": {"$regex": "ana"}, "age": {"$gte": 21, "$lt": 65}}
# sort=[("age", -1)], skip=0, limit=20
# (values in `contains` filters are regex-escaped before compilation)

…and every one of those parameters is documented, validated and typed in /docs.


Built with AI

This project is designed and developed with the assistance of AI (Anthropic's Claude Code). Design documents and code are AI-generated and human-reviewed.


Status

fast-pager is under active development. The 0.1.0 release ships Stages 1–2 in full: the zero-config scalar filtering pipeline, Mongo compiler, sorting/pagination, and per-field Filterable(...) control shown above — and the documentation describes exactly the shipped API. The project is still pre-1.0: per SemVer, breaking changes bump the minor version and are called out in release notes. See the changelog for exactly what each version shipped.

Documentation

The full documentation site — getting started, tutorials, operator reference, and the design documents below — lives at fast-pager.eytanohana.com. It's built with Zensical from docs/; see docs/contributing/docs-site.md for how it's configured and how to preview it locally.

Releasing (maintainers)

Releases are fully automated. From a clean main:

./scripts/release.sh patch     # or minor / major

The script bumps the version in pyproject.toml (via uv version --bump), commits, tags v<version>, and pushes. The tag triggers release.yml, which:

  1. verifies the tag matches the pyproject.toml version,
  2. runs the full CI matrix,
  3. builds with uv build and publishes to PyPI via Trusted Publishing (OIDC — no API tokens),
  4. creates the GitHub Release with generated notes.

fast_pager.__version__ reads from package metadata, so the version lives in exactly one place.


Design documents

These are the product-design documents the implementation is built from. Read them in order:

# Document What it covers
00 Overview & Vision The problem, goals, non-goals, naming, guiding principles
01 Developer Experience API surface options explored, the recommended ergonomics
02 Type & Operator System Which Python types we support, their operators, compound types, per-field configurability
03 Architecture The layered pipeline, the filter AST, the FastAPI signature trick
04 Backend Roadmap Mongo today, generalizing to any database tomorrow
05 Roadmap & Release Plan Phased path to a clean 1.0 on PyPI

Start with 00-overview.md.

Release files for fast-pager 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fast-pager 0.1.3
File Size Uploaded
fast_pager-0.1.3.tar.gz 29.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fast-pager 0.1.3
File Interpreter ABI Platform
fast_pager-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 67.0 kB

Release files / fast_pager-0.1.3.tar.gz

Download URL fast_pager-0.1.3.tar.gz
Size 29.8 kB
Tags Source
SHA-256 checksum
How to use checksums
936eb7ffad07e3e7e822ffac4f7b6ef7887cc9aa7f0311d09cbf96dc4fb36510
BLAKE2b-256 checksum
How to use checksums
d67e617e2e9413f5e4549cb1fa0d85aaf8fc8914625b35f62f21ed19ffd252b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fast_pager-0.1.3-py3-none-any.whl

Download URL fast_pager-0.1.3-py3-none-any.whl
Size 37.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc2ec981b2ac988480e7a754d613398e9208b06782a18cf8340393d0ab72c5ee
BLAKE2b-256 checksum
How to use checksums
f4057108c5b450bb0bb833f3a2c358c6292c107c2f4ac1cd97218966db60b494
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page