Overview
Peewee has been written and maintained by Charles Leifer since 2010. It is a single module with no required dependencies: SQLite works through the standard library, and extras install drivers for MySQL, PostgreSQL (psycopg2 or psycopg3) and async drivers. Models look like Django's, and queries compose with Python operators, joins, subqueries, window functions and CTEs.
The playhouse package adds extensions: SQLite user-defined functions and full-text search, connection pooling, reflection, shortcuts to and from dicts, and a migrations module. The changelog describes playhouse.migrations with a pwmigrate CLI that can create, generate and diff migrations and run up and down scripts, including per-schema history.
Version 4.0.0, released on 20 February 2026, added asyncio support via a greenlet bridge (AsyncDatabaseMixin.run and helpers such as aget and asave) on aiosqlite, asyncpg and aiomysql; a later release marked the async API as stable. Because one person maintains nearly all of it, direction and priorities follow the author's judgement.
Pricing and plans
| Plan | Price | What you get |
|---|---|---|
| Peewee | $0 | MIT licence |
What it does
- Single module
- No required dependencies; SQLite support comes from the standard library.
- Expressive queries
- Composable select, join, subquery, window function and CTE support using Python operators.
- Asyncio support
- Since 4.0, async helpers run Peewee code over asyncpg, aiomysql or aiosqlite through greenlet.
- Migrations
- playhouse.migrations and the pwmigrate CLI create, generate, diff and apply migration scripts.
- SQLite extensions
- User-defined functions, full-text search, JSON and other SQLite-specific features in the playhouse.
Strengths and limitations
Strengths
- Small and quick to learn
- Very good SQLite support
- No required dependencies
- Long, steady maintenance history
Limitations
- Maintained almost entirely by one person
- Async support is a greenlet bridge over synchronous code, not a native async ORM
- Supports only SQLite, MySQL/MariaDB and PostgreSQL in core; no SQL Server or Oracle
- Smaller ecosystem of framework integrations than SQLAlchemy
Who it suits
Good for
- Scripts, CLIs and small web apps
- SQLite-based desktop or embedded projects
- Flask apps that want something lighter than SQLAlchemy
Look elsewhere if
- Enterprise apps needing SQL Server or Oracle
- Large teams that want a project with many maintainers
Pricing history
-
Peewee 4.0 adds asyncio support
Peewee 4.0.0 added an asyncio layer built on greenlet for aiosqlite, asyncpg and aiomysql; a later release marked it stable. Source ↗
Alternatives to Peewee
| Tool | From | Free option | Stages |
|---|---|---|---|
| GORM Full-featured Go ORM | — | ||
| Knex.js JavaScript SQL query builder | — | ||
| SeaORM Async dynamic ORM for Rust | — | ||
| Prisma ORM Schema-first TypeScript ORM | $10/mo | Free tier | |
| Bun (Go ORM) SQL-first Go ORM | — | ||
| Drizzle ORM SQL-like TypeScript ORM | — |
Questions
Does Peewee support async?
Yes, since version 4.0 (February 2026) through a greenlet-based asyncio layer with aiosqlite, asyncpg and aiomysql.
Does Peewee have migrations?
Yes. The playhouse migrations module and pwmigrate CLI create, generate and apply migration scripts.
Which databases does Peewee support?
SQLite, MySQL, MariaDB and PostgreSQL, with an extension for CockroachDB.
Sources read for this page