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
Metadata
Release files for fastrdb 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fastrdb-0.0.3.tar.gz | 6.7 kB | Without provenance | Details for fastrdb-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fastrdb-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for fastrdb-0.0.3-py3-none-any.whl |
Total release size: 13.8 kB
Release files / fastrdb-0.0.3.tar.gz
| Download URL | fastrdb-0.0.3.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b25ec88bf37bb70753ed9531a80ad9b69c01c427cd397224d7bdacc0eca55ea
|
|
BLAKE2b-256 checksum How to use checksums |
dc27f2098ba944c9458c8c9adbb733549eebae6000f750b50189a2c7d4480acc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / fastrdb-0.0.3-py3-none-any.whl
| Download URL | fastrdb-0.0.3-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b6a9c993d4ec9aea83a25397c795213293c59fd14a0619a811522a808a8588fe
|
|
BLAKE2b-256 checksum How to use checksums |
c62806b2b8e71537303ccb23f651cc721c45b829931ac152dfc35f8f9ee1e48d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for fastrdb 0.0.3
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.