| What it is | SQL databases in Python, designed for simplicity, compatibility, and robustness | The Python SQL toolkit and Object Relational Mapper | Compile SQL to type-safe code |
| Features | - one class is both a SQLAlchemy table and a Pydantic model
- Python type annotations with editor completion
- data validation and serialization through Pydantic
- full SQLAlchemy underneath
- designed for FastAPI
- official agent skill for AI coding agents
| - Core SQL Expression Language
- optional ORM with unit of work and identity map
- schema DDL generation and introspection
- dialects for PostgreSQL, MySQL/MariaDB, SQLite, Oracle and SQL Server
- sync and asyncio drivers
- eager and lazy loading strategies
- hand-written SQL can replace generated statements
- bind parameters for all literal values
| - type-safe code generated from SQL schema and queries
- built-in Go generator; plugins for Kotlin, Python and TypeScript
- PostgreSQL and MySQL (stable); SQLite, ClickHouse, DuckDB, Spanner and SQL Server (beta)
- vet command for linting queries
- verify command for checking schema changes
- fmt, parse and analyze commands
- query annotations, macros, type overrides and struct configuration
- codegen plugins for more languages
- All 10 features
|