
pydantic-sqlalchemy
Tools to convert SQLAlchemy models to Pydantic models
The Lens
pydantic-sqlalchemy does one small thing: it turns your SQLAlchemy database models into Pydantic models automatically. If you use both in a Python project, FastAPI is the common case, you otherwise end up hand-writing a second set of models that mirror your tables. This generates them for you. MIT-licensed and free.
It's a tiny utility from the author of FastAPI, and it's labeled experimental, not a polished library you build a system on. For a quick script or a small project where you want Pydantic schemas off your existing tables without the boilerplate, it saves real typing.
The catch: modern stacks mostly solve this differently now, with SQLModel (also from the same author) combining SQLAlchemy and Pydantic into one model, or by generating schemas directly. Reach for this only if you specifically have separate SQLAlchemy models and want Pydantic versions fast. Otherwise, SQLModel is probably the better starting point.
Free vs Self-Hosted vs Paid
fully freeFree: MIT, free. A small single-purpose library.
Self-hosted: It's a Python package you import. Nothing to host.
Paid: No paid version. There's nothing to buy.
Free and open source, but experimental. SQLModel is usually the better starting point now.
Get tools like this every Wednesday
One featured tool, three on the radar. No fluff.
License: MIT License
Use freely, including commercial. Just keep the license.
Commercial use: ✓ Yes
About
- Owner
- Sebastián Ramírez (User)
- Stars
- 1,408
- Forks
- 74
Explore Further
More tools in the directory
openclaw
Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞
382.0k ★everything-claude-code
The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
226.7k ★hermes-agent
The agent that grows with you
210.5k ★