Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coleifer/flask-peewee
flask integration for peewee, including admin, authentication, rest api and more
https://github.com/coleifer/flask-peewee
flask peewee python web-framework
Last synced: 3 days ago
JSON representation
flask integration for peewee, including admin, authentication, rest api and more
- Host: GitHub
- URL: https://github.com/coleifer/flask-peewee
- Owner: coleifer
- License: mit
- Created: 2011-09-16T23:32:56.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T12:57:30.000Z (7 months ago)
- Last Synced: 2024-08-31T22:49:28.707Z (2 months ago)
- Topics: flask, peewee, python, web-framework
- Language: Python
- Homepage: http://flask-peewee.readthedocs.org/
- Size: 1.54 MB
- Stars: 775
- Watchers: 40
- Forks: 181
- Open Issues: 34
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
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 apirequirements:
* `flask `_
* `peewee `_
* `wtforms `_
* `wtf-peewee `_
* python 2.5 or greatercheck out the `documentation `_.
admin interface
---------------influenced heavily by the `django `_ admin, provides easy
create/edit/delete functionality for your project's models... image:: 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-peeweeexample 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.pyif 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/