Skip to main content

Python library for FastAPI, boosting SQLAlchemy and Redis with pagination, error handling, and session management.

Supported Python Versions PyPi Version Tests Codecov


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:

pip install fastgear

Using Poetry

Run the following command:

poetry add fastgear

Using uv

Run the following command:

uv add fastgear

FastGear CLI

To make working with FastGear even easier, there is an official CLI tool available:

fastgear-cli — a command-line interface that helps you scaffold and manage FastGear-based projects with less boilerplate.

License

This project is licensed under the terms of the MIT license.

Metadata

Release files for fastgear 0.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastgear 0.10.0
File Size Uploaded Provenance Actions
fastgear-0.10.0.tar.gz 38.4 kB Without provenance Details for fastgear-0.10.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fastgear 0.10.0
File Interpreter ABI Platform Actions
fastgear-0.10.0-py3-none-any.whl Python 3 none any Details for fastgear-0.10.0-py3-none-any.whl

Total release size: 88.4 kB

Release files / fastgear-0.10.0.tar.gz

Download URL fastgear-0.10.0.tar.gz
Size 38.4 kB
Tags Source
SHA-256 checksum
How to use checksums
16071de1036ed8ee45a50e5ecd2a42abf32b895b04125d34b5157de0ef5679d3
BLAKE2b-256 checksum
How to use checksums
d00ef60751e62c017c278f5c5bd1c87d836f9909c5e3260f67fb11398fd43755
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fastgear-0.10.0-py3-none-any.whl

Download URL fastgear-0.10.0-py3-none-any.whl
Size 50.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ec9c561e6ce94f3dd703a5787534a181d3c8006bccf4f96499ccea34e9c2138
BLAKE2b-256 checksum
How to use checksums
4d4cfc4c7a30d35863aa49a0e120b192ffb3c11c3418f65a483d0f18ce3b556a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for fastgear 0.10.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.10.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page