Command Palette

Search for a command to run...

position in category
#4

SQL toolkit and Object-Relational Mapper for Python that exposes the full power of SQL while automating repetitive persistence tasks. Combines a composable Core layer for connections, schema management, and SQL expression building with an optional ORM that implements the data mapper pattern, letting application code and database schema evolve independently.

Widely adopted as the standard database toolkit in the Python ecosystem, deployed across thousands of production environments. Unlike Django ORM or other opinionated tools, it does not hide SQL or impose schema conventions: developers remain in control of how queries are built and how the database is organized, with the library handling connection pooling, bind parameters, DDL generation, and introspection.

Key features:

  • Core and ORM as separate, optional layers: build strictly with the SQL expression language or add the ORM when object mapping is useful
  • Dialects for SQLite, PostgreSQL, MySQL, MariaDB, Oracle, and MS-SQL with sync and async driver support
  • Unit of Work pattern for batched writes and transaction safety, DBA-approved patterns with full bind parameters
  • Schema representation for DDL emission and introspection, composite keys, inheritance mapping, and eager loading
  • Modular, extensible design with an event system for custom hooks across statement execution, pooling, and persistence

Developers use it for web apps, APIs, data pipelines, and ETL jobs where precise control over SQL matters. Integrates with Flask, FastAPI, and other frameworks via ecosystem extensions, and suits teams that want to drop to raw SQL when needed without leaving the toolkit.

GitHub Repositories
144
-13.8%
Trending down this week
Removed in 23 repos