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: Console or JSON logging with request context, an access log middleware, and trace correlation for FastAPI's OpenTelemetry support
Optional
- CLI: Django-like command-line interface with fixture management and custom commands support
- Metrics: Prometheus metrics endpoint with provider/collector registry
- OpenTelemetry logs: Forward standard
loggingrecords to OpenTelemetry logs - 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 6.0.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 | Provenance | Actions |
|---|---|---|---|---|
| fastapi_toolsets-6.0.1.tar.gz | 79.1 kB | With provenance | Details for fastapi_toolsets-6.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fastapi_toolsets-6.0.1-py3-none-any.whl | Python 3 | none | any | Details for fastapi_toolsets-6.0.1-py3-none-any.whl |
Total release size: 174.7 kB
Release files / fastapi_toolsets-6.0.1.tar.gz
| Download URL | fastapi_toolsets-6.0.1.tar.gz |
|---|---|
| Size | 79.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8526b97cf9f855c9db7a1d3d77e692db7bbc6baf02e518b7bb2c1773b31a18f4
|
|
BLAKE2b-256 checksum How to use checksums |
4f9d6bea9167e36026284e337baba885463b22a0c99c0e51d32e9471b6521d14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 20, 2026.
Transparency logRelease files / fastapi_toolsets-6.0.1-py3-none-any.whl
| Download URL | fastapi_toolsets-6.0.1-py3-none-any.whl |
|---|---|
| Size | 95.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ecdfa15af9c3f44bb8e94617e3bbb7eb3dd57223e2526ea782d0aee8d159946b
|
|
BLAKE2b-256 checksum How to use checksums |
f53dccf4b4c06d4b5058292bfc56945f86537b9246ded82eeac4e9456f18ffef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 20, 2026.
Transparency logSecurity for fastapi-toolsets 6.0.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for fastapi_toolsets-6.0.1.tar.gz
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 Oct 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.