fast-pager 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Eytan Ohana
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,114 @@
1
+ Metadata-Version: 2.4
2
+ Name: fast-pager
3
+ Version: 0.0.1
4
+ Summary: Automatic filterable, sortable, paginated query parameters for FastAPI, derived from your Pydantic models.
5
+ Keywords: fastapi,pagination,filtering,sorting,pydantic,mongodb
6
+ Author: Eytan Ohana
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Classifier: Development Status :: 1 - Planning
10
+ Classifier: Programming Language :: Python
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: Topic :: Software Development :: Libraries
19
+ Classifier: Framework :: FastAPI
20
+ Classifier: Framework :: Pydantic
21
+ Requires-Python: >=3.11
22
+ Project-URL: Homepage, https://github.com/eytanohana/fast-pager
23
+ Project-URL: Repository, https://github.com/eytanohana/fast-pager
24
+ Project-URL: Issues, https://github.com/eytanohana/fast-pager/issues
25
+ Description-Content-Type: text/markdown
26
+
27
+ # fast-pager
28
+
29
+ > Turn your Pydantic models into filterable, sortable, paginated FastAPI query parameters — automatically.
30
+
31
+ `fast-pager` reads the Pydantic models you already use in your FastAPI routes and
32
+ generates **type-safe query parameters** for filtering, sorting and pagination.
33
+ Those parameters show up in your OpenAPI docs for free, and compile down to a
34
+ real database query (MongoDB first, more backends later).
35
+
36
+ ```python
37
+ class User(BaseModel):
38
+ name: str
39
+ age: int
40
+
41
+ @app.get("/users")
42
+ async def list_users(q: FilterQuery[User] = FilterDepends(User)):
43
+ return await db.users.find(q.to_mongo()).to_list(None)
44
+ ```
45
+
46
+ A request to:
47
+
48
+ ```
49
+ GET /users?name__contains=ana&age__gte=21&age__lt=65&sort=-age&limit=20
50
+ ```
51
+
52
+ …compiles to:
53
+
54
+ ```python
55
+ {"name": {"$regex": "ana"}, "age": {"$gte": 21, "$lt": 65}}
56
+ # sort=[("age", -1)], skip=0, limit=20
57
+ # (values in `contains` filters are regex-escaped before compilation)
58
+ ```
59
+
60
+ …and every one of those parameters is documented, validated and typed in `/docs`.
61
+
62
+ ---
63
+
64
+ ## Built with AI
65
+
66
+ This project is designed and developed with the assistance of AI (Anthropic's
67
+ Claude Code). Design documents and code are AI-generated and human-reviewed.
68
+
69
+ ---
70
+
71
+ ## Status
72
+
73
+ `fast-pager` is in the **design phase**. The package is published to PyPI as a
74
+ placeholder (`0.0.x`) to reserve the name — it contains no functionality yet.
75
+ Don't depend on it until `0.1`.
76
+
77
+ ## Releasing (maintainers)
78
+
79
+ Releases are fully automated. From a clean `main`:
80
+
81
+ ```bash
82
+ ./scripts/release.sh patch # or minor / major
83
+ ```
84
+
85
+ The script bumps the version in `pyproject.toml` (via `uv version --bump`),
86
+ commits, tags `v<version>`, and pushes. The tag triggers
87
+ [`release.yml`](.github/workflows/release.yml), which:
88
+
89
+ 1. verifies the tag matches the `pyproject.toml` version,
90
+ 2. runs the full CI matrix,
91
+ 3. builds with `uv build` and publishes to PyPI via **Trusted Publishing**
92
+ (OIDC — no API tokens),
93
+ 4. creates the GitHub Release with generated notes.
94
+
95
+ `fast_pager.__version__` reads from package metadata, so the version lives in
96
+ exactly one place.
97
+
98
+ ---
99
+
100
+ ## Design documents
101
+
102
+ This repository currently contains **only the product design** — no implementation yet.
103
+ Read the docs in order:
104
+
105
+ | # | Document | What it covers |
106
+ |---|----------|----------------|
107
+ | 00 | [Overview & Vision](docs/design/00-overview.md) | The problem, goals, non-goals, naming, guiding principles |
108
+ | 01 | [Developer Experience](docs/design/01-developer-experience.md) | API surface options explored, the recommended ergonomics |
109
+ | 02 | [Type & Operator System](docs/design/02-type-and-operator-system.md) | Which Python types we support, their operators, compound types, per-field configurability |
110
+ | 03 | [Architecture](docs/design/03-architecture.md) | The layered pipeline, the filter AST, the FastAPI signature trick |
111
+ | 04 | [Backend Roadmap](docs/design/04-backend-roadmap.md) | Mongo today, generalizing to any database tomorrow |
112
+ | 05 | [Roadmap & Release Plan](docs/design/05-roadmap-and-release.md) | Phased path to a clean 1.0 on PyPI |
113
+
114
+ Start with **[00-overview.md](docs/design/00-overview.md)**.
@@ -0,0 +1,88 @@
1
+ # fast-pager
2
+
3
+ > Turn your Pydantic models into filterable, sortable, paginated FastAPI query parameters — automatically.
4
+
5
+ `fast-pager` reads the Pydantic models you already use in your FastAPI routes and
6
+ generates **type-safe query parameters** for filtering, sorting and pagination.
7
+ Those parameters show up in your OpenAPI docs for free, and compile down to a
8
+ real database query (MongoDB first, more backends later).
9
+
10
+ ```python
11
+ class User(BaseModel):
12
+ name: str
13
+ age: int
14
+
15
+ @app.get("/users")
16
+ async def list_users(q: FilterQuery[User] = FilterDepends(User)):
17
+ return await db.users.find(q.to_mongo()).to_list(None)
18
+ ```
19
+
20
+ A request to:
21
+
22
+ ```
23
+ GET /users?name__contains=ana&age__gte=21&age__lt=65&sort=-age&limit=20
24
+ ```
25
+
26
+ …compiles to:
27
+
28
+ ```python
29
+ {"name": {"$regex": "ana"}, "age": {"$gte": 21, "$lt": 65}}
30
+ # sort=[("age", -1)], skip=0, limit=20
31
+ # (values in `contains` filters are regex-escaped before compilation)
32
+ ```
33
+
34
+ …and every one of those parameters is documented, validated and typed in `/docs`.
35
+
36
+ ---
37
+
38
+ ## Built with AI
39
+
40
+ This project is designed and developed with the assistance of AI (Anthropic's
41
+ Claude Code). Design documents and code are AI-generated and human-reviewed.
42
+
43
+ ---
44
+
45
+ ## Status
46
+
47
+ `fast-pager` is in the **design phase**. The package is published to PyPI as a
48
+ placeholder (`0.0.x`) to reserve the name — it contains no functionality yet.
49
+ Don't depend on it until `0.1`.
50
+
51
+ ## Releasing (maintainers)
52
+
53
+ Releases are fully automated. From a clean `main`:
54
+
55
+ ```bash
56
+ ./scripts/release.sh patch # or minor / major
57
+ ```
58
+
59
+ The script bumps the version in `pyproject.toml` (via `uv version --bump`),
60
+ commits, tags `v<version>`, and pushes. The tag triggers
61
+ [`release.yml`](.github/workflows/release.yml), which:
62
+
63
+ 1. verifies the tag matches the `pyproject.toml` version,
64
+ 2. runs the full CI matrix,
65
+ 3. builds with `uv build` and publishes to PyPI via **Trusted Publishing**
66
+ (OIDC — no API tokens),
67
+ 4. creates the GitHub Release with generated notes.
68
+
69
+ `fast_pager.__version__` reads from package metadata, so the version lives in
70
+ exactly one place.
71
+
72
+ ---
73
+
74
+ ## Design documents
75
+
76
+ This repository currently contains **only the product design** — no implementation yet.
77
+ Read the docs in order:
78
+
79
+ | # | Document | What it covers |
80
+ |---|----------|----------------|
81
+ | 00 | [Overview & Vision](docs/design/00-overview.md) | The problem, goals, non-goals, naming, guiding principles |
82
+ | 01 | [Developer Experience](docs/design/01-developer-experience.md) | API surface options explored, the recommended ergonomics |
83
+ | 02 | [Type & Operator System](docs/design/02-type-and-operator-system.md) | Which Python types we support, their operators, compound types, per-field configurability |
84
+ | 03 | [Architecture](docs/design/03-architecture.md) | The layered pipeline, the filter AST, the FastAPI signature trick |
85
+ | 04 | [Backend Roadmap](docs/design/04-backend-roadmap.md) | Mongo today, generalizing to any database tomorrow |
86
+ | 05 | [Roadmap & Release Plan](docs/design/05-roadmap-and-release.md) | Phased path to a clean 1.0 on PyPI |
87
+
88
+ Start with **[00-overview.md](docs/design/00-overview.md)**.
@@ -0,0 +1,47 @@
1
+ [project]
2
+ name = "fast-pager"
3
+ version = "0.0.1"
4
+ description = "Automatic filterable, sortable, paginated query parameters for FastAPI, derived from your Pydantic models."
5
+ readme = "README.md"
6
+ requires-python = ">=3.11"
7
+ dependencies = []
8
+
9
+ authors = [
10
+ { name = "Eytan Ohana" }
11
+ ]
12
+ license = "MIT"
13
+ license-files = ["LICENSE"]
14
+ keywords = ["fastapi", "pagination", "filtering", "sorting", "pydantic", "mongodb"]
15
+ classifiers = [
16
+ "Development Status :: 1 - Planning",
17
+ "Programming Language :: Python",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3 :: Only",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Programming Language :: Python :: 3.14",
24
+ "Intended Audience :: Developers",
25
+ "Topic :: Software Development :: Libraries",
26
+ "Framework :: FastAPI",
27
+ "Framework :: Pydantic",
28
+ ]
29
+
30
+ [project.urls]
31
+ Homepage = "https://github.com/eytanohana/fast-pager"
32
+ Repository = "https://github.com/eytanohana/fast-pager"
33
+ Issues = "https://github.com/eytanohana/fast-pager/issues"
34
+
35
+ [build-system]
36
+ requires = ["uv_build>=0.9.13,<0.12.0"]
37
+ build-backend = "uv_build"
38
+
39
+ [dependency-groups]
40
+ dev = [
41
+ "pytest>=8.0.0",
42
+ "ruff>=0.14.0",
43
+ ]
44
+
45
+ [tool.ruff]
46
+ line-length = 100
47
+ src = ["src", "tests"]
@@ -0,0 +1,14 @@
1
+ """fast-pager — filterable, sortable, paginated query parameters for FastAPI.
2
+
3
+ Derives type-safe filter/sort/pagination query parameters from the Pydantic
4
+ models you already use, surfaces them in OpenAPI, and compiles them to a
5
+ backend query (MongoDB first).
6
+
7
+ This is a placeholder release reserving the package name while the library is
8
+ under active design. See the design documents in the repository:
9
+ https://github.com/eytanohana/fast-pager
10
+ """
11
+
12
+ from importlib.metadata import version
13
+
14
+ __version__ = version("fast-pager")