Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Covers SQLModel and SQLAlchemy patterns for async database operations, pooling, migrations, and performance on PostgreSQL, MySQL, SQLite.
Use this skill ↓44% 56%+12 ptsof test cases passed
Passed 14 of 25 test cases with the skill, and 11 of 25 without it.
3 of 3 safety checks passed
Not used yet
This skill provides comprehensive database patterns and best practices for 2025, focusing on async operations, performance optimization, and production-ready configurations that work across different database systems.
Use this skill when you need to:
# Database connection setup with connection pooling
import asyncio
from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine, async_sessionmaker
from sqlalchemy.pool import NullPool
from contextlib import asynccontextmanager
import os
# Environment-based configuration
DATABASE_CONFIG = {
"development": {
"url": "sqlite+aiosqlite:///./app.db",
"poolclass": NullPool,
"echo": True
},
"production": {
"url": os.getenv("DATABASE_URL", "postgresql+asyncpg://user:pass@localhost/db"),
"pool_size": 30,
"max_overflow": 40,
"pool_pre_ping": True,
Next to this one in the catalogue, plus popular skills in the same category.