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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b25ec88bf37bb70753ed9531a80ad9b69c01c427cd397224d7bdacc0eca55ea
|
|
| MD5 |
954a5b55241f1f6dee5048ab9749f3e2
|
|
| BLAKE2b-256 |
dc27f2098ba944c9458c8c9adbb733549eebae6000f750b50189a2c7d4480acc
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6a9c993d4ec9aea83a25397c795213293c59fd14a0619a811522a808a8588fe
|
|
| MD5 |
c6e6e8887527934158332c10ad9bb00b
|
|
| BLAKE2b-256 |
c62806b2b8e71537303ccb23f651cc721c45b829931ac152dfc35f8f9ee1e48d
|