# flask-peewee

Warning

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.

Welcome to the flask-peewee documentation!

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

Contents:

- Installing
  - Using git
- Getting Started
  - Creating a flask app
  - Creating a simple model
  - Setting up a simple base template
  - Adding users to the site
  - Managing content using the admin area
  - Exposing content using a REST API
- Database Wrapper
  - Other examples
- Admin Interface
  - Getting started
  - Customizing how models are displayed
  - Nicer display for Foreign Key fields
  - Creating admin panels
  - Handling File Uploads
- Authentication
  - Getting started
  - Marking areas of the site as login required
  - Retrieving the current user
  - Accessing the user in the templates
  - Using a custom “User” model
- REST Api
  - Getting started with the API
  - Creating a RestAPI
  - Customizing what is returned
  - Allowing users to post objects
  - Restricting API access on a per-model basis
  - Locking down a resource
  - Filtering records and querying
  - Sorting results
  - Limiting results and pagination
- Utilities
  - Getting objects
  - Misc
- Using gevent
  - Database configuration
  - Monkey-patch the thread module
  - Rationale

API in depth:

- API
  - Admin
  - Auth
  - Database
  - REST API
  - Utilities

# Indices and tables

- Index

- Module Index

- Search Page