🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

flashdb

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flashdb

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.

0.0.1
PyPI
Maintainers
1

flashDB.

Follow DRY principles and keep your code DRY with FlashDB
FlashDB 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

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

  • However, FlashDB 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, FlashDB 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 FlashDB.

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 FlashDB:

uv pip install flashdb
  • Using pip

Create a virtual environment and activate it:

python3 -m venv venv
source venv/bin/activate

Install FlashDB:

pip install flashdb

Now you are ready to use FlashDB! 🤩

Tutorial

Click here to see a complete example

Keywords

fastapi

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts