peewee
a little orm
Decision gist · record as of 2026-08-14
Yes. Peewee is a mature, actively maintained ORM with zero required dependencies, a clean API, and broad database support. It is well-suited for projects that need database abstraction without the complexity of larger ORMs. The only caveat is that the license treatment is marked unclear in the metadata—verify the actual license before committing to production use.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.8.
- For databases other than SQLite, install optional extras: peewee[mysql], peewee[postgres], peewee[psycopg3], or peewee[aiosqlite], peewee[aiomysql], peewee[asyncpg].
- Installs with no required dependencies and ships as a single wheel.
License · maintenance · safety
(unclear)
last release 2026-07-31 (14 days) · last repo commit 2026-08-13 · 11,984 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 51,713,163 downloads/mo, #567 on PyPI
Alternatives
Verify before relying
pip install peewee
from peewee import *
db = SqliteDatabase('my_database.db')
class User(Model):
username = CharField(unique=True)
class Meta:
database = db
db.connect()
db.create_tables([User])
user = User.create(username='alice')- Whether the license_treatment 'unclear' reflects a genuine licensing ambiguity or a metadata gap that should be resolved before production use.
- Whether asyncio support is production-ready or still experimental.
What it is and what it does
Peewee is a small, expressive ORM designed to be easy to learn and intuitive to use. It maps Python model classes to database tables and provides a composable query builder that exposes the full power of SQL without requiring an external query language. The package has no required runtime dependencies and ships as a single module, making it lightweight enough for embedded use while remaining production-ready—it has been running workloads of all sizes since 2010.
You define models as Python classes with field attributes, connect to a database (SQLite, MySQL, MariaDB, or PostgreSQL), and then create, read, update, and delete records using method calls and chainable query expressions. Peewee also supports asyncio workflows via optional drivers and integrates with popular frameworks like Flask, FastAPI, and Pydantic, making it suitable for both simple scripts and larger web applications.
Use it for
- Build a web application with Flask or FastAPI that needs to persist user data, posts, or other domain objects to a relational database.
- Write a command-line tool or batch script that reads and writes to SQLite without managing SQL strings directly.
- Migrate from a heavier ORM to something simpler when you need direct SQL control but still want model abstraction.
- Implement a web service using the standard async drivers with PostgreSQL or MySQL as the backing store.
- Prototype or build a small-to-medium application where you want to avoid the overhead of a large framework's ORM.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Peewee is a mature, actively maintained ORM with zero required dependencies, a clean API, and broad database support. It is well-suited for projects that need database abstraction without the complexity of larger ORMs. The only caveat is that the license treatment is marked unclear in the metadata—verify the actual license before committing to production use.
Install
peewee on PyPI
Before you install
Installs with no required dependencies and ships as a single wheel. Actively maintained with a recent release 14 days ago; the repository shows 11984 stars and continuous development since 2010.
Requires Python >=3.8. For databases other than SQLite, install optional extras: peewee[mysql], peewee[postgres], peewee[psycopg3], or peewee[aiosqlite], peewee[aiomysql], peewee[asyncpg].
Quickstart
pip install peewee
from peewee import *
db = SqliteDatabase('my_database.db')
class User(Model):
username = CharField(unique=True)
class Meta:
database = db
db.connect()
db.create_tables([User])
user = User.create(username='alice')
Verify before relying
- Whether the license_treatment 'unclear' reflects a genuine licensing ambiguity or a metadata gap that should be resolved before production use.
- Whether asyncio support is production-ready or still experimental.
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 14 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 51,713,163 / month, #567 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: DatabaseTopic :: Database :: Front-EndsTopic :: Software Development :: Libraries :: Python Modules |
Evidence: peewee-4.3.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “lightweight python orm”
- peeweePeewee is a lightweight ORM that maps Python classes to database…
- recordsRecords provides a lightweight SQL query interface for relational…
- infi.clickhouse-ormAn ORM for ClickHouse that lets you define model classes, insert…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also peewee-migrate · django-mysql · types-peewee · tortoise-orm · databases · sqlalchemy-mixins · pony · nplusone · aiosql · pypika-tortoise