• Stars
    star
    776
  • Rank 58,561 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created about 13 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

flask integration for peewee, including admin, authentication, rest api and more

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.

flask-peewee

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

batteries included:

  • admin interface
  • authentication
  • rest api

requirements:

check out the documentation.

admin interface

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

http://i.imgur.com/EtzdO.jpg

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": "[email protected]",
      "join_date": "2011-09-16 18:35:56",
      "active": true,
      "id": 2
    }
  ]
}

installing

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 run_example.py script:

cd example/
python run_example.py

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

http://127.0.0.1:5000/admin/

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

http://127.0.0.1:5000/api/message/

More Repositories

1

peewee

a small, expressive orm -- supports postgresql, mysql, sqlite and cockroachdb
Python
11,103
star
2

huey

a little task queue for python
Python
5,154
star
3

sqlite-web

Web-based SQLite database browser written in Python
Python
3,359
star
4

walrus

Lightweight Python utilities for working with Redis
Python
1,149
star
5

micawber

a small library for extracting rich content from urls
Python
632
star
6

unqlite-python

Python bindings for the UnQLite embedded NoSQL database
C
389
star
7

django-relationships

Descriptive relationships between auth.users (think facebook friends and twitter followers, plus more)
Python
369
star
8

scout

RESTful search server written in Python, powered by SQLite.
Python
299
star
9

pysqlite3

SQLite3 DB-API 2.0 driver from Python 3, packaged separately, with improvements
C
184
star
10

irc

tinkering with a made-from-scratch irc library in python
Python
179
star
11

django-generic-m2m

relate anything to anything
Python
153
star
12

simpledb

miniature redis-like server implemented in Python
Python
138
star
13

python-lsm-db

Python bindings for the SQLite4 LSM database.
C
129
star
14

vedis-python

Python bindings for the Vedis embedded NoSQL database
C
125
star
15

wtf-peewee

WTForms integration for peewee
Python
111
star
16

sqlcipher3

Python 3 bindings for SQLCipher
C
85
star
17

sophy

Fast Python bindings to Sophia Database
C
80
star
18

django-generic-aggregation

annotate() and aggregate() for generically-related data.
Python
72
star
19

beefish

simple file encryption with pycrypto
Python
67
star
20

ucache

gametight lightweight caching library for python
Python
65
star
21

chrome-extensions

Personal collection of chrome extensions
JavaScript
61
star
22

sqlite-vtfunc

Implement SQLite table-valued functions with Python
Cython
58
star
23

sweepea

Fast, lightweight Python database toolkit for SQLite, built with Cython.
Cython
42
star
24

dot-theme

dotfile templating tools
Python
31
star
25

greendb

server frontend for lmdb
Python
25
star
26

kvkit

dank key/value store high-level APIs
Python
18
star
27

kt

Fast Python client for KyotoTycoon
Python
18
star
28

ukt

Kyoto Tycoon client library for Python.
Python
11
star
29

sqlite3-bloomfilter

Bloomfilter for SQLite3
C
6
star