sqlalchemy-postgres

Design PostgreSQL database layers with SQLAlchemy 2.0, Pydantic, and Alembic.

Updated Nov 16, 2025
One-click install
npx skills add https://github.com/daniel-dihardja/menuyukti --skill sqlalchemy-postgres-daniel-dihardja
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sqlalchemy-postgres
Source: https://github.com/daniel-dihardja/menuyukti/tree/main/.agents/skills/sqlalchemy-postgres
Command: npx skills add https://github.com/daniel-dihardja/menuyukti --skill sqlalchemy-postgres-daniel-dihardja

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides expert guidance to design and implement production-ready database layers using SQLAlchemy 2.0, Pydantic, and Alembic for PostgreSQL.

Core Features & Use Cases

  • Clear architecture guidance for robust DB layers including models, schemas, repositories, and services.
  • Async patterns, migrations, and repository-based data access for scalable apps.
  • Production-ready patterns, best practices, and reference material for PostgreSQL apps.

Quick Start

Define a minimal async database layer by wiring SQLAlchemy 2.0 models, Pydantic schemas, Alembic migrations, and a simple repository against PostgreSQL.

Frequently Asked Questions about sqlalchemy-postgres

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up an async SQLAlchemy 2.0 database layer with FastAPI and PostgreSQL?▼

To build an async SQLAlchemy 2.0 database layer with FastAPI, wire ORM models using Mapped[] annotations, configure async sessions, and implement repository patterns for scalable PostgreSQL data access.

What is the best way to manage Alembic migrations with async SQLAlchemy models?▼

Managing Alembic migrations with async SQLAlchemy involves integrating Alembic into your project to handle schema changes while maintaining type-safe mappings and async session configurations for PostgreSQL.

Can I use Pydantic schemas directly with SQLAlchemy repositories in a production app?▼

Yes, Pydantic schemas can be used with SQLAlchemy repositories to enforce type-safe mappings. This pattern separates data validation from ORM models, ensuring robust data access in production PostgreSQL apps.

Does SQLAlchemy 2.0 support type-safe ORM mappings for large PostgreSQL projects?▼

SQLAlchemy 2.0 supports type-safe ORM mappings using Mapped[] annotations, providing clear architecture guidance for robust database layers scalable across small to large PostgreSQL projects.

Why use a repository pattern for async data access instead of direct ORM queries?▼

Using a repository pattern for async data access abstracts direct ORM queries, centralizing database operations. This ensures maintainable, production-ready data access layers in async frameworks like FastAPI.

When do I need Alembic integration for a SQLAlchemy and PostgreSQL application?▼

You need Alembic integration when managing database schema migrations in production PostgreSQL applications, ensuring structured updates alongside SQLAlchemy ORM models and async data access patterns.