Skip to main content

A high-performance, generic CRUD operations package combining SQLAlchemy async ORM with Redis caching. Features type-safe CRUD operations, automatic cache invalidation, pagination support, and Pydantic integration for schema validation. Ideal for FastAPI backends and read-heavy applications requiring optimized database access.

Project description

fastRDB.

Follow DRY principles and keep your code DRY with FastRDB
FastRDB is a high-performance, generic CRUD operations package combining SQLAlchemy async ORM with Redis caching.


Features

  • Type-Safe CRUD Operations: Built with Python type hints and generics for robust type checking
  • SQLAlchemy Integration: Seamless integration with SQLAlchemy for database operations
  • Redis Caching: Integrated Redis caching with automatic cache invalidation
  • Async Support: Fully asynchronous operations using SQLAlchemy async ORM and Redis
  • Pagination: Built-in pagination support with customizable limits and page numbers
  • Pydantic Integration: Seamless integration with Pydantic for schema validation
  • Generic Base Class: Extensible base class for creating custom CRUD operations
  • Automatic Cache Management: Smart cache invalidation on data modifications
  • Error Handling: Consistent error handling with custom exceptions

Note

  • ⚡ FastRDB is designed with FastAPI (Fastest Python Web Framework) in mind, providing optimal support for asynchronous operations, dependency injection, and Pydantic-based validation.

  • However, FastRDB is framework-agnostic — you can use it with any Python async environment (such as plain asyncio, Quart, Starlette, etc.), as long as you're using SQLAlchemy's async ORM.

  • Whether you're building REST APIs, microservices, or internal tooling, FastRDB can boost your productivity with clean and reusable CRUD operations. 💡


Requirements

  • Python 3.10 or higher
  • SQLAlchemy
  • Redis
  • Pydantic
  • orjson

You only need to ensure Python version compatibility. All other dependencies will be installed automatically with FastRDB.


Installation

  • Using uv

First create a virtual environment and activate it
(if not already done and it's a good practice to keep your dependencies in a virtual environment) :

uv venv
source .venv/bin/activate 

Install FastRDB:

uv pip install fastrdb
  • Using pip

Create a virtual environment and activate it:

python3 -m venv venv
source venv/bin/activate

Install FastRDB:

pip install fastrdb

Now you are ready to use FastRDB! 🤩


Tutorial

Click here to see a complete example

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

fastrdb-0.0.3.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

fastrdb-0.0.3-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file fastrdb-0.0.3.tar.gz.

File metadata

  • Download URL: fastrdb-0.0.3.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for fastrdb-0.0.3.tar.gz
Algorithm Hash digest
SHA256 2b25ec88bf37bb70753ed9531a80ad9b69c01c427cd397224d7bdacc0eca55ea
MD5 954a5b55241f1f6dee5048ab9749f3e2
BLAKE2b-256 dc27f2098ba944c9458c8c9adbb733549eebae6000f750b50189a2c7d4480acc

See more details on using hashes here.

File details

Details for the file fastrdb-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: fastrdb-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for fastrdb-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b6a9c993d4ec9aea83a25397c795213293c59fd14a0619a811522a808a8588fe
MD5 c6e6e8887527934158332c10ad9bb00b
BLAKE2b-256 c62806b2b8e71537303ccb23f651cc721c45b829931ac152dfc35f8f9ee1e48d

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