mirror of
https://github.com/d3vyce/fastapi-toolsets.git
synced 2026-08-04 15:44:09 +00:00
b6796180f7a8687d9d71f6ff3e70466726cb03cd
b6796180f7
⬆ Bump pymdown-extensions from 10.21.2 to 10.21.3 (#284)
Bumps [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) from 10.21.2 to 10.21.3. - [Release notes](https://github.com/facelessuser/pymdown-extensions/releases) - [Commits](https://github.com/facelessuser/pymdown-extensions/compare/10.21.2...10.21.3) --- updated-dependencies: - dependency-name: pymdown-extensions dependency-version: 10.21.3 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
feat: add NOWAIT/SKIP LOCKED row locking support and extend with_for_update to get_multi and update (#281)
feat: add NOWAIT/SKIP LOCKED row locking support and extend with_for_update to get_multi and update (#281)
feat: add NOWAIT/SKIP LOCKED row locking support and extend with_for_update to get_multi and update (#281)
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[security]"
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
- Security: Composable authentication sources (
BearerTokenAuth,CookieAuth,APIKeyHeaderAuth,MultiAuth) with HMAC-signed cookies and OAuth 2.0 / OIDC helpers - 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.
Languages
Python
100%