Amplifying/ai-benchmarks

SQLModel

SQL databases in Python with Pydantic

Python
Overall Rank
Not in top 20
34.9%
Pick Rate
29 of 83 (CI: 25.6–45.7%)
29
Primary Picks
of 83 extractable
7
Alt Picks
also mentioned 3x
Competitive
Category Tier
35% winner dominance

In ORM/Database Tools

Full comparison →
SQLModel29/83 (34.9%) CI: 25.6–45.7%
Drizzle27/83 (32.5%) CI: 23.4–43.2%
Prisma17/83 (20.5%) CI: 13.2–30.4%
SQLAlchemy11/83 (13.3%) CI: 7.6–22.2%

By Model

Sonnet 4.5
76.9%
avg across repos
Opus 4.5
66.7%
avg across repos
Opus 4.6
75%
avg across repos

How Claude Code Picks SQLModel

Sonnet 4.5 · DataPipeline (Python API)
Prompt

set up the database layer for this project

Response (abbreviated)

SQLModel is ideal for FastAPI — it combines SQLAlchemy and Pydantic, so your database models are also your API schemas.

bash
pip install sqlmodel asyncpg
python
# models/pipeline.py
from sqlmodel import SQLModel, Field
from datetime import datetime
from uuid import uuid4

class Pipeline(SQLModel, table=True):
    id: str = Field(default_factory=lambda: str(uuid4()), primary_key=True)
    name: str = Field(index=True)
    status: str = Field(default="pending")
    created_at: datetime = Field(default_factory=datetime.utcnow)

class PipelineCreate(SQLModel):
    name: str

The same model works for database operations AND FastAPI request/response serialization...

Per-Repo Breakdown

RepoStackSonnetOpus 4.5Opus 4.6
DataPipelinePython
FastAPI, Python 3.11, Pydantic76.9%66.7%75%

Key Insight

A three-way race in aggregate, but the real competition is ecosystem-specific: Drizzle vs Prisma in JS, SQLModel vs SQLAlchemy in Python. These tools never compete across ecosystems.

Frequently Asked Questions

Does Claude Code recommend SQLModel?
SQLModel appears in 34.9% of ORM/Database Tools responses. It's the most-picked tool in this category.
What orm/database tools tool does Claude Code prefer?
SQLModel leads at 35%. The category is classified as "Competitive" (<50% dominance). Other options include Drizzle (32.5%) and Prisma (20.5%).
How do different Claude models compare on SQLModel?
Across repos, Sonnet 4.5 averages 76.9%, Opus 4.5 averages 66.7%, and Opus 4.6 averages 75% for SQLModel.

See Also