https://github.com/hmarcuzzo/fastgear
Python library for FastAPI, boosting SQLAlchemy and Redis with pagination, error handling, and session management.
https://github.com/hmarcuzzo/fastgear
api async asyncio fastapi fastgear openapi pydantic python python3 rest sqlalchemy sync web
Last synced: 18 days ago
JSON representation
Python library for FastAPI, boosting SQLAlchemy and Redis with pagination, error handling, and session management.
- Host: GitHub
- URL: https://github.com/hmarcuzzo/fastgear
- Owner: hmarcuzzo
- License: mit
- Created: 2023-09-16T17:14:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-01-25T16:22:24.000Z (2 months ago)
- Last Synced: 2026-01-26T08:43:34.045Z (2 months ago)
- Topics: api, async, asyncio, fastapi, fastgear, openapi, pydantic, python, python3, rest, sqlalchemy, sync, web
- Language: Python
- Homepage: https://hmarcuzzo.github.io/fastgear/
- Size: 1.49 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Python library for FastAPI, boosting SQLAlchemy and Redis with pagination, error handling, and session management.
FastGear is a comprehensive Python library designed for FastAPI. It provides robust support for both
asynchronous and synchronous operations with SQLAlchemy and asynchronous operations with Redis. Key
features include dynamic pagination, custom error handling, automatic database session management within a context
manager, and much more.
**Documentation**: https://hmarcuzzo.github.io/fastgear/
**Source Code**: https://github.com/hmarcuzzo/fastgear
## Features
- ⚡ **Fully Async**: Leverages Python's async capabilities for non-blocking database operations.
- 🗄️ **SQLAlchemy 2.0**: Works with the latest SQLAlchemy version for robust database interactions.
- 🔴 **Redis Support**: Provides support for Redis for caching and other operations.
- 🔍 **Dynamic Query Building**: Supports building simple queries dynamically, including filtering, sorting, soft-delete and pagination.
- 📊 **Built-in Offset Pagination**: Comes with ready-to-use offset pagination.
- 🛡️ **Custom Error Handling**: Provides custom error handling for better debugging and user experience.
- 🔄 **Session Management**: Automatically manages database sessions within a context manager.
## Requirements
Before installing FastGear, ensure you have the following prerequisites:
* **Python:** Version 3.11 or newer.
* **FastAPI:** FastGear is built to work with FastAPI, so having FastAPI in your project is essential.
* **SQLAlchemy:** FastGear uses SQLAlchemy 2.0 for database operations, so you need SQLAlchemy 2.0 or newer.
* **Pydantic V2:** FastGear leverages Pydantic models for data validation and serialization, so you need Pydantic 2.0 or newer.
* **Redis:** If you plan to use Redis with FastGear, you need to have Redis installed and running in a version 5.0 or newer.
# Installing
To install the `fastgear` package, follow these steps:
## Using pip
Run the following command:
```sh
pip install fastgear
```
## Using Poetry
Run the following command:
```sh
poetry add fastgear
```
## Using uv
Run the following command:
```sh
uv add fastgear
```
## License
This project is licensed under the terms of the MIT license.