Skip to main content

A personal utility library I've developed to streamline and optimize backend development with FastAPI in my projects. From generic repositories and queries to enums, error handling, and more, FastGear encompasses essential tools that have proven invaluable in my development journey, whether as a novice or a seasoned professional.

Project description

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

Supported Python Versions


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.


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, 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.10 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

License

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

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

fastgear-0.1.1.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

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

fastgear-0.1.1-py3-none-any.whl (35.8 kB view details)

Uploaded Python 3

File details

Details for the file fastgear-0.1.1.tar.gz.

File metadata

  • Download URL: fastgear-0.1.1.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.3 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for fastgear-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d2e7eb1b4b83701ff4b66f0ebb96d2d8a87c23e8c51e4a2472f7dc6c01e4b02e
MD5 fc1aaff2d52fa0d0dec648e8818058d2
BLAKE2b-256 cfcb81a3479d83eb0673a2af31b1653b2844f273afc884ff734ffa4b23be9781

See more details on using hashes here.

File details

Details for the file fastgear-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fastgear-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 35.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.3 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for fastgear-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 433a07ce1bc7b22c400fe28935aabce4468902e71b44c28cadfe5003b6c023ad
MD5 74300359c34d43a28da1abb385416780
BLAKE2b-256 5b448a247cd80562485747e48c53f18bb17a96e2ff5c2d72f2a72c1a38101a80

See more details on using hashes here.

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