peewee — peewee 0.9.8 documentation

### Navigation

- index
- next |
- peewee 0.9.8 documentation »

# peewee

- a small orm
- written in python
- provides a lightweight querying interface over sql
- uses sql concepts when querying, like joins and where clauses

For flask integration, including an admin interface and RESTful API, check out flask-peewee.

## Contents:

- Overview
  - Why?
- Installing peewee
  - Installing with git
- Peewee Cookbook
  - Database and Connection Recipes
  - Creating, Reading, Updating and Deleting
  - Working with transactions
  - Introspecting databases
- Example app
  - Running the example
  - Diving into the code
- Model API (smells like django)
  - Creating tables
  - Model instances
  - Model options
  - Model methods
- Fields
  - Field types table
  - Self-referential Foreign Keys
  - Implementing Many to Many
  - Non-integer Primary Keys
  - Field class API
- Querying API
  - Constructing queries
  - Where clause
  - Performing advanced queries
  - Query evaluation
  - QueryResultWrapper
  - SelectQuery
  - UpdateQuery
  - DeleteQuery
  - InsertQuery
  - RawQuery
- Databases
  - Writing a database driver
  - Database and its subclasses
  - BaseAdapter and its subclasses
- Playhouse, a collection of addons
  - apsw, an advanced sqlite driver
  - Postgresql Extensions (hstore)
  - pwiz, a model generator
  - Signal support
  - Sqlite Extensions
  - Swee’pea, syntactic sugar for peewee

# Indices and tables

- Index
- Module Index
- Search Page

### Navigation

- index
- next |
- peewee 0.9.8 documentation »