fastapi-database-async

Community

Reliable async DB for FastAPI with SQLAlchemy

Authoramaozhao
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill configures a production-grade asynchronous SQLAlchemy 2.0 database layer for FastAPI projects, enabling scalable and reliable data access with async sessions and pooling.

Core Features & Use Cases

  • Async engine and session management with connection pooling for FastAPI apps.
  • Health checks, race-condition resistant patterns, and Pydantic v2 compatibility.
  • Use Case: Deploy a FastAPI service that requires async database connections, pooled resources, and clean transaction boundaries.

Quick Start

Set up the base engine and session factory in your FastAPI project, then expose a get_db dependency to provide AsyncSession instances to endpoints. For example, create an async engine with your DATABASE_URL, define AsyncSessionLocal via async_sessionmaker, and wire a dependency that yields sessions per request.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: fastapi-database-async
Download link: https://github.com/amaozhao/MySkills/archive/main.zip#fastapi-database-async

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.