Skip to main content

Reusable tools for FastAPI: async CRUD, fixtures, CLI, and standardized responses for SQLAlchemy + PostgreSQL

Project description

FastAPI Toolsets

FastAPI Toolsets provides production-ready utilities for FastAPI applications built with async SQLAlchemy and PostgreSQL. It includes generic CRUD operations, a fixture system with dependency resolution, a Django-like CLI, standardized API responses, and structured exception handling with automatic OpenAPI documentation.

CI codecov ty uv Ruff Python 3.11+ License: MIT


Documentation: https://fastapi-toolsets.d3vyce.fr

Source Code: https://github.com/d3vyce/fastapi-toolsets


Installation

uv add fastapi-toolsets

Features

  • CRUD: Generic async CRUD operations with CrudFactory, built-in search with relationship traversal
  • 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
  • CLI: Django-like command-line interface with fixture management and custom commands support
  • Standardized API Responses: Consistent response format with Response, PaginatedResponse, and PydanticBase
  • Exception Handling: Structured error responses with automatic OpenAPI documentation
  • Logging: Logging configuration with uvicorn integration via configure_logging and get_logger
  • Pytest Helpers: Async test client, database session management, pytest-xdist support, 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi_toolsets-0.8.1.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastapi_toolsets-0.8.1-py3-none-any.whl (36.7 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_toolsets-0.8.1.tar.gz.

File metadata

  • Download URL: fastapi_toolsets-0.8.1.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fastapi_toolsets-0.8.1.tar.gz
Algorithm Hash digest
SHA256 432f1ac12005865f351195083b45571ecdd9cd6805a89d0341c126240c895402
MD5 0387fcf357989beac0a5b2e69fcff9a4
BLAKE2b-256 228dcead86a4f6f60ed3c3a9f1386ea195d0bbe41db199e3451c27c154bc4eed

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastapi_toolsets-0.8.1.tar.gz:

Publisher: build-release.yml on d3vyce/fastapi-toolsets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastapi_toolsets-0.8.1-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_toolsets-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 adfb5720c1bfd8460bc8b2d93f52de2f9f9796f046309155efe0088de1152ef9
MD5 da360f5edc72d28d61645160fe3d70d4
BLAKE2b-256 0a75dde7a5f2c210e15f0fcfd6b87d6c7105962cb4d26e3f1118d2a9f85fa5cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastapi_toolsets-0.8.1-py3-none-any.whl:

Publisher: build-release.yml on d3vyce/fastapi-toolsets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page