HeHisHim / peewee

a small, expressive orm -- supports postgresql, mysql and sqlite

Home Page:http://docs.peewee-orm.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

image

peewee

Peewee is a simple and small ORM. It has few (but expressive) concepts, making it easy to learn and intuitive to use.

image

New to peewee? Here is a list of documents you might find most helpful when getting started:

For flask helpers, check out the flask_utils extension module. You can also use peewee with the popular extension flask-admin to provide a Django-like admin interface for managing peewee models.

Examples

Defining models is similar to Django or SQLAlchemy:

Connect to the database and create tables:

Create a few rows:

Queries are expressive and composable:

Check out the example app for a working Twitter-clone website written with Flask.

Learning more

Check the documentation for more examples.

Specific question? Come hang out in the #peewee channel on irc.freenode.net, or post to the mailing list, http://groups.google.com/group/peewee-orm . If you would like to report a bug, create a new issue on GitHub.

Still want more info?

image

I've written a number of blog posts about building applications and web-services with peewee (and usually Flask). If you'd like to see some real-life applications that use peewee, the following resources may be useful:

About

a small, expressive orm -- supports postgresql, mysql and sqlite

http://docs.peewee-orm.com/

License:MIT License


Languages

Language:Python 95.6%Language:C 4.2%Language:C++ 0.2%