# coleifer/peewee

a small, expressive orm -- supports postgresql, mysql, sqlite, now with asyncio

Repository: https://github.com/coleifer/peewee
Canonical: https://ross.abutalabs.com/products/peewee
Homepage: http://docs.peewee-orm.com/
Language: Python
License: MIT
License Family: permissive
Topics: dank, gametight, peewee, sqlite, python, asyncio, fastapi, flask
Last push: 2026-08-26T23:34:49+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 99, longevity 100
- inputs: {"age_days": 5805, "days_push": 7, "days_rel": 10, "gap_med": 11, "n_releases_24m": 30}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 11986, forks 1382 (observed 2026-08-28T04:10:50.598920+00:00)

## What it is
Peewee is a small, expressive Python ORM with a flexible query builder that supports SQLite, MySQL/MariaDB, and PostgreSQL, plus asyncio backends. It is a single dependency-free module in production use since 2010, with schema migrations and framework integrations for Flask, FastAPI, and Pydantic.

## Use cases
- define database models and query tables in python
- use an orm with sqlite in a small python app
- add postgresql or mysql persistence to a flask or fastapi app
- run async database queries with asyncio
- generate and run schema migrations for a python project
- write raw sql with a lightweight query builder
- avoid heavy orms like sqlalchemy for simple projects

## When to choose
- you want a lightweight, easy-to-learn ORM with no required dependencies
- your app uses SQLite, MySQL/MariaDB, or PostgreSQL in Python
- you need asyncio database access built on standard async drivers
- you want expressive query building while retaining full SQL power

## When to avoid
- you need a multi-database ORM with advanced features like SQLAlchemy's ecosystem
- you require an async-first ORM with deep async ecosystem integration
- you need databases beyond the DB-API 2.0 drivers Peewee supports

## Facets
- artifact type: library
- maturity: stable
- function: orm, database-driver, database
- domain: databases, web-development, backend, developer-tools
- platform: python, cross-platform
- tags: query-builder, asyncio, sqlite, postgresql, mysql, schema-migrations, flask, fastapi

## Member repositories
- coleifer/peewee (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:50.598920+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:15:01.588801+00:00, confidence not recorded.
  - readme: https://github.com/coleifer/peewee (fetched 2026-08-28T04:10:50.598920+00:00, sha dacefae03969)
  - homepage: http://docs.peewee-orm.com/ (fetched 2026-08-29T08:12:48.092273+00:00, sha 12b7ce5155ca)
  - site_page: http://docs.peewee-orm.com/en/latest/peewee/quickstart.html (fetched 2026-08-29T08:12:48.094769+00:00, sha 1c57be68322e)
  - site_page: http://docs.peewee-orm.com/en/latest/peewee/installation.html (fetched 2026-08-29T08:12:48.096467+00:00, sha fec4a96a9a73)
  - site_page: http://docs.peewee-orm.com/en/latest/peewee/asyncio.html (fetched 2026-08-29T08:12:48.098053+00:00, sha b9f549bdaf5a)
  - registry_pypi: https://pypi.org/pypi/peewee/json (fetched 2026-08-29T08:12:48.100560+00:00, sha 52b57c4ed66b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
