Production-ready utilities for FastAPI applications
Project description
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) and lifecycle callbacks (WatchedFieldsMixin,@watch) that fire after commit for insert, update, and delete events - 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastapi_toolsets-2.4.2.tar.gz.
File metadata
- Download URL: fastapi_toolsets-2.4.2.tar.gz
- Upload date:
- Size: 41.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d748049df78b59801ab8de91db2bab98e7521df017b40f6c738dff992e84db2
|
|
| MD5 |
6af7da4d46ca6490482639836db58bda
|
|
| BLAKE2b-256 |
a5fbf36aa8852f8fba0c68e4a70006d9a2e9fb95ced5caf591f2715c1de79430
|
Provenance
The following attestation bundles were made for fastapi_toolsets-2.4.2.tar.gz:
Publisher:
build-release.yml on d3vyce/fastapi-toolsets
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastapi_toolsets-2.4.2.tar.gz -
Subject digest:
1d748049df78b59801ab8de91db2bab98e7521df017b40f6c738dff992e84db2 - Sigstore transparency entry: 1175221249
- Sigstore integration time:
-
Permalink:
d3vyce/fastapi-toolsets@337985ef388d213c0bb5755f6e528090d0e13bf2 -
Branch / Tag:
refs/tags/v2.4.2 - Owner: https://github.com/d3vyce
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-release.yml@337985ef388d213c0bb5755f6e528090d0e13bf2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fastapi_toolsets-2.4.2-py3-none-any.whl.
File metadata
- Download URL: fastapi_toolsets-2.4.2-py3-none-any.whl
- Upload date:
- Size: 55.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4996c13eb9dc1d36e36aef72d85dfd2fed7f1a01c1100e6dd15c1e8bd4c9949d
|
|
| MD5 |
13d16dc52ef6bf712440018519564221
|
|
| BLAKE2b-256 |
d09d04938abba7daca2f3fe06640d42794966f0f7453c8c6cd3bea7a7948f7ae
|
Provenance
The following attestation bundles were made for fastapi_toolsets-2.4.2-py3-none-any.whl:
Publisher:
build-release.yml on d3vyce/fastapi-toolsets
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastapi_toolsets-2.4.2-py3-none-any.whl -
Subject digest:
4996c13eb9dc1d36e36aef72d85dfd2fed7f1a01c1100e6dd15c1e8bd4c9949d - Sigstore transparency entry: 1175221306
- Sigstore integration time:
-
Permalink:
d3vyce/fastapi-toolsets@337985ef388d213c0bb5755f6e528090d0e13bf2 -
Branch / Tag:
refs/tags/v2.4.2 - Owner: https://github.com/d3vyce
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-release.yml@337985ef388d213c0bb5755f6e528090d0e13bf2 -
Trigger Event:
release
-
Statement type: