Skip to content
flask integration for peewee, including admin, authentication, rest api and more
Python HTML CSS JavaScript
Latest commit 88bee11 May 7, 2016 @coleifer Cache count()
Failed to load latest commit information.
docs Updates. Nov 21, 2015
example Removing unused import, fixes #107 Nov 14, 2013
flask_peewee Cache count() May 7, 2016
LICENSE Initial checkin Sep 16, 2011 Renaming package to be more pythonic Nov 24, 2011
README.rst maintenance mode Oct 10, 2014 Remove unused os.path, fixes #106 Nov 12, 2013 Updates. Nov 22, 2015


This package is in maintenance-only mode!

I'm sorry to announce that flask-peewee will now be in maintenance-only mode. This decision is motivated by a number of factors:

  • Flask-Admin provides a superior admin interface and has support for peewee models.
  • Flask-Security and Flask-Login both provide authentication functionality, and work well with Peewee.
  • Most importantly, though, I do not find myself wanting to work on flask-peewee.

I plan on rewriting the Database and REST API portions of flask-peewee and repackaging them as a new library, but flask-peewee as it stands currently will be in maintenance-only mode.


provides a layer of integration between the flask web framework and the peewee orm.

batteries included:

  • admin interface
  • authentication
  • rest api


check out the documentation.

admin interface

influenced heavily by the django admin, provides easy create/edit/delete functionality for your project's models.

rest api

influenced by tastypie, provides a way to expose a RESTful interface for your project's models.

curl localhost:5000/api/user/
  "meta": {
    "model": "user",
    "next": "",
    "page": 1,
    "previous": ""
  "objects": [
      "username": "admin",
      "admin": true,
      "email": "",
      "join_date": "2011-09-16 18:34:49",
      "active": true,
      "id": 1
      "username": "coleifer",
      "admin": false,
      "email": "",
      "join_date": "2011-09-16 18:35:56",
      "active": true,
      "id": 2


I recommend installing in a virtualenv. to get started:

# create a new virtualenv
virtualenv --no-site-packages project
cd project/
source bin/activate

# install this project (will install dependencies as well)
pip install flask-peewee

example app

the project ships with an example app, which is a silly twitter clone. to start the example app, cd into the "example" directory and execute the script:

cd example/

if you would like to test out the admin area, log in as "admin/admin" and navigate to:

you can check out the REST api at the following url:

Something went wrong with that request. Please try again.