neon-async-db

Establishes asynchronous PostgreSQL connections for Neon Serverless using SQLModel and SQLAlchemy async engine and sessions.

Updated Jan 2, 2026
One-click install
npx skills add https://github.com/omerspac/advanced-to-do-app --skill neon-async-db-omerspac
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: neon-async-db
Source: https://github.com/omerspac/advanced-to-do-app/tree/main/Phase-2/.claude/skills/neon-async-db
Command: npx skills add https://github.com/omerspac/advanced-to-do-app --skill neon-async-db-omerspac

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Establishing and maintaining reliable asynchronous connections to Neon Serverless PostgreSQL can be complex, error-prone, and performance-sensitive in serverless environments.

Core Features & Use Cases

  • Asynchronous engine creation using the postgresql+asyncpg driver with SQLModel/SQLAlchemy.
  • Async session provisioning and lifecycle management with proper context handling and expire_on_commit behavior.
  • Centralized health checks and serverless-optimized pooling to ensure robust connectivity in production.

Quick Start

Connect using a DATABASE_URL with the postgresql+asyncpg driver and fetch an AsyncSession via get_async_session to begin operations.

Frequently Asked Questions about neon-async-db

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

FAQPage Schema
How do I connect to Neon Serverless PostgreSQL using async SQLAlchemy in Python?

To connect to Neon Serverless PostgreSQL using async SQLAlchemy, configure your DATABASE_URL with the postgresql+asyncpg driver to establish an asynchronous engine and fetch an AsyncSession for database operations.

What is the best way to manage SQLModel async sessions in a serverless Python app?

Managing SQLModel async sessions in a serverless Python app requires proper async context handling and serverless-optimized pooling to ensure robust connectivity and scalable database access during execution.

Can I use SQLModel with SQLAlchemy's async capabilities for Neon database connections?

Yes, you can use SQLModel with SQLAlchemy's async capabilities for Neon database connections by creating an async engine with the asyncpg driver and centralizing Base metadata for your models.

Why does my async PostgreSQL connection drop in serverless environments?

Async PostgreSQL connections drop in serverless environments due to improper pooling and lack of health checks. Serverless-optimized pooling and centralized health checks enforce proper context management to maintain reliable connectivity.

How do I configure expire_on_commit behavior for an AsyncSession in SQLModel?

To configure expire_on_commit behavior for an AsyncSession in SQLModel, provision the session with proper lifecycle management to control whether attributes expire after a transaction commit.