
peewee
A small Python ORM for working with PostgreSQL, MySQL, and SQLite databases.
- Stars
- 12k
- Forks
- 1.4k
- Licence
- MIT
- Language
- Python
- Last update
- 5 days ago
- Type
- Library
What it is
Peewee is a Python library that maps database tables to Python classes, so you can read and write data with Python code instead of raw SQL. The description says it is small and expressive and supports PostgreSQL, MySQL, and SQLite, with asyncio support. The README was not included in full here, so details beyond this summary are limited.
- Define database tables as Python model classes
- Query and update records from a Python web app
- Use the same model code against SQLite during development and a different database in production
Great for
- Python developers who want a lightweight ORM instead of a large framework
- Projects using SQLite, PostgreSQL, or MySQL
- Developers building small web apps or services with Flask or FastAPI, based on the repository topics
Not ideal for
- Teams that need features beyond what the available README summary describes, since the full README was not provided to verify them
- Non-Python projects, because the library is written for Python
How to get it
- 1
Install with a package manager
You'll need: Python
Clone the repository
git clone https://github.com/coleifer/peewee - 2
Run it
- Install the library following the project documentation at http://docs.peewee-orm.com/
- Define a model class that maps to a database table
- Connect to a database and run a simple query
- 3
Get the most out of it
- Read the official documentation at http://docs.peewee-orm.com/ for models, queries, and database backends
- Use the asyncio support if your application is async, as mentioned in the description
Downloads
Strengths
- Small codebase with a focused scope, according to its description
- Supports several major relational databases
- Has asyncio support and an MIT license
Trade-offs
- The README provided was truncated, so many details could not be checked
- Using an ORM adds an abstraction layer that you need to learn alongside SQL
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| peewee (this) | 12k | Library | beginner | 5 days ago | Python developers who want a lightweight ORM instead of a large framework |
| sqlalchemy | 12.3k | Library | intermediate | 5 days ago | Python developers building applications backed by a SQL database |
| typeorm | 36.7k | Library | intermediate | 8 days ago | Node.js or TypeScript developers building apps backed by a relational database |
| sequelize | 30.3k | Library | intermediate | 5 days ago | Node.js backend developers who use a relational SQL database |
| sqlmodel | 18.5k | Library | beginner | 4 days ago | Python developers building FastAPI applications that use a SQL database |
| libsql | 17.3k | Library | intermediate | 20 days ago | Developers who already use SQLite and want extra features like embedded replicas |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.