FastAPI Toolsets
A modular collection of production-ready utilities for FastAPI. Install only what you need — from async CRUD and database helpers to CLI tooling, Prometheus metrics, and pytest fixtures. Each module is independently installable via optional extras, keeping your dependency footprint minimal.
Documentation: https://fastapi-toolsets.d3vyce.fr
Source Code: https://github.com/d3vyce/fastapi-toolsets
Installation
The base package includes the core modules (CRUD, database, schemas, exceptions, fixtures, dependencies, model mixins, logging):
uv add fastapi-toolsets
Install only the extras you need:
uv add "fastapi-toolsets[cli]"
uv add "fastapi-toolsets[metrics]"
uv add "fastapi-toolsets[pytest]"
Or install everything:
uv add "fastapi-toolsets[all]"
Features
Core
- CRUD: Generic async CRUD operations with
CrudFactory, built-in full-text/faceted search and Offset/Cursor pagination. - Database: Session management, transaction helpers, table locking, and polling-based row change detection
- Dependencies: FastAPI dependency factories (
PathDependency,BodyDependency) for automatic DB lookups from path or body parameters - Fixtures: Fixture system with dependency management, context support, and pytest integration
- Model Mixins: SQLAlchemy mixins for common column patterns (
UUIDMixin,UUIDv7Mixin,CreatedAtMixin,UpdatedAtMixin,TimestampMixin) - Lifecycle Events: Post-commit event system (
EventSession,listens_for) that dispatches async/sync callbacks for insert, update, and delete operations - Standardized API Responses: Consistent response format with
Response,ErrorResponse,PaginatedResponse,CursorPaginatedResponseandOffsetPaginatedResponse. - Exception Handling: Structured error responses with automatic OpenAPI documentation
- Logging: Logging configuration with uvicorn integration via
configure_loggingandget_logger
Optional
- CLI: Django-like command-line interface with fixture management and custom commands support
- Metrics: Prometheus metrics endpoint with provider/collector registry
- Pytest Helpers: Async test client, database session management,
pytest-xdistsupport, and table cleanup utilities
License
MIT License - see LICENSE for details.
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
Metadata
Release files for fastapi-toolsets 5.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fastapi_toolsets-5.1.1.tar.gz | 56.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fastapi_toolsets-5.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 128.5 kB
Release files / fastapi_toolsets-5.1.1.tar.gz
| Download URL | fastapi_toolsets-5.1.1.tar.gz |
|---|---|
| Size | 56.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c68fa8da218de1d89c30c6710dec226e15956a223f393b7e2ee8f05a662360f3
|
|
BLAKE2b-256 checksum How to use checksums |
f88cc688e284b7c96242af44f65e562b9a5c65ce4db5b5cc17e0ab0c22489fd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.
Transparency logRelease files / fastapi_toolsets-5.1.1-py3-none-any.whl
| Download URL | fastapi_toolsets-5.1.1-py3-none-any.whl |
|---|---|
| Size | 72.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cec308ff89ee33fdb4a129d34e2e18c2834b33c0fd3b0537666e2224dcf34919
|
|
BLAKE2b-256 checksum How to use checksums |
f0c21d1beb4b8218eb88a53cd922363db7325b9b4acfb1830954133327fd6d83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.
Transparency log