SQLModel Models & Sessions Skill

Community

SQLModel models and async sessions for FastAPI.

AuthorSobansaud
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill helps developers model data with SQLModel and orchestrate asynchronous sessions for Neon PostgreSQL in FastAPI projects, reducing boilerplate and maintenance overhead.

Core Features & Use Cases

  • Define SQLModel models with table=True (User, Task) and establish relationships (User has many Tasks) with proper foreign keys (user_id).
  • Setup asynchronous engines and sessions using create_async_engine and AsyncSession for non-blocking database access.
  • Implement dependency injection via a get_session-like pattern to provide a session to FastAPI routes.
  • Optimize performance with indexing on frequently queried fields (e.g., user_id, email).

Quick Start

Provide a minimal example that defines models, creates an async engine, and shows a FastAPI route using Depends(get_session) to operate on Task/User models.

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: SQLModel Models & Sessions Skill
Download link: https://github.com/Sobansaud/Hackhathon---2/archive/main.zip#sqlmodel-models-sessions-skill

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 471,000+ vetted skills library on demand.