python-peewee
Installation
SKILL.md
Python Peewee
Overview
Use Peewee with DatabaseProxy, scoped connection handling, explicit transactions, and isolated SQLite tests. Core principle: initialize the database at the boundary, then keep models and tests deterministic.
Use When
- Defining Peewee models or a shared
BaseModel. - Wiring
DatabaseProxyfor app and test databases. - Choosing
connection_context()vsatomic(). - Writing SQLite-backed fixtures for model tests.