peewee Documentation Release 1.0.0peewee 1.0.0 documentation » peewee a small orm written in python provides a lightweight querying interface over sql uses sql concepts when querying, like joins and where clauses support for special extensions org/en/latest/peewee/playhouse.html#full-text-search] For flask integration, including an admin interface and RESTful API, check out flask-peewee [https://github.com/coleifer/flask-peewee/]. Contents: selecting a user User.get(username='charles') # get the staff and super users editors = User.select().where(Q(is_staff=True) | Q(is_superuser=True)) # get tweets by editors Tweet.select().where(user__in=editors)0 码力 | 101 页 | 163.20 KB | 1 年前3
peewee Documentation
Release 1.0.0Documentation, Release 1.0.0 • a small orm • written in python • provides a lightweight querying interface over sql • uses sql concepts when querying, like joins and where clauses • support for special special extensions like hstore and full-text search For flask integration, including an admin interface and RESTful API, check out flask-peewee. CONTENTS 1 peewee Documentation, Release 1.0.0 2 CONTENTS selecting a user User.get(username=’charles’) # get the staff and super users editors = User.select().where(Q(is_staff=True) | Q(is_superuser=True)) # get tweets by editors Tweet.select().where(user__in=editors)0 码力 | 71 页 | 405.29 KB | 1 年前3
peewee Documentation
Release 2.0.2lightweight querying interface over sql • uses sql concepts when querying, like joins and where clauses • support for some extensions, like hstore For flask integration, including an admin interface and RESTful Examples: # a simple query selecting a user User.get(User.username == ’charles’) # get the staff and super users editors = User.select().where( (User.is_staff == True) | (User.is_superuser == True) ) # get tweets where(Tweet.user << editors) # how many active users are there? User.select().where(User.active == True).count() # paginate the user table and show me page 3 (users 41-60) User.select().order_by(User.username)0 码力 | 65 页 | 315.33 KB | 1 年前3
peewee Documentation Release 3.0.0row tuples / dictionaries / namedtuples Returning Clause Query operators Three valued logic Adding user-defined operators Expressions Foreign Keys Traversing foreign keys Joining tables Implementing Many Extensions Getting started APIs Additional Features Playhouse, extensions to Peewee SqliteQ Sqlite User-Defined Functions apsw, an advanced sqlite driver Sqlcipher backend Postgresql Extensions DataSet correspond to the table’s columns. For the twitter clone, there are just three models: User: Represents a user account and stores the username and password, an email address for generating avatars using0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation Release 0.9.7peewee 0.9.7 documentation » peewee a small orm written in python provides a lightweight querying interface over sql uses sql concepts when querying, like joins and where clauses Contents: Overview Why selecting a user User.get(username='charles') # get the staff and super users editors = User.select().where(Q(is_staff=True) | Q(is_superuser=True)) # get tweets by editors Tweet.select().where(user__in=editors) where(user__in=editors) # how many active users are there? User.select().where(active=True).count() # paginate the user table and show me page 3 (users 41- 60) User.select().order_by(('username', 'asc')).paginate(30 码力 | 78 页 | 143.68 KB | 1 年前3
peewee Documentation
Release 0.9.7Documentation, Release 0.9.7 • a small orm • written in python • provides a lightweight querying interface over sql • uses sql concepts when querying, like joins and where clauses CONTENTS 1 peewee Documentation selecting a user User.get(username=’charles’) # get the staff and super users editors = User.select().where(Q(is_staff=True) | Q(is_superuser=True)) # get tweets by editors Tweet.select().where(user__in=editors) where(user__in=editors) # how many active users are there? User.select().where(active=True).count() # paginate the user table and show me page 3 (users 41-60) User.select().order_by((’username’, ’asc’)).paginate(3,0 码力 | 53 页 | 347.03 KB | 1 年前3
peewee Documentation Release 3.4.0row tuples / dictionaries / namedtuples Returning Clause Query operators Three valued logic Adding user-defined operators Expressions Foreign Keys Traversing foreign keys Joining tables Implementing Extensions Getting started APIs Additional Features Playhouse, extensions to Peewee SqliteQ Sqlite User-Defined Functions apsw, an advanced sqlite driver Sqlcipher backend Postgresql Extensions MySQL Extensions correspond to the table’s columns. For the twitter clone, there are just three models: User: Represents a user account and stores the username and password, an email address for generating avatars using0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation
Release 3.4.0correspond to the table’s columns. For the twitter clone, there are just three models: User: Represents a user account and stores the username and password, an email address for generating avatars using account was created. Relationship: This is a utility model that contains two foreign-keys to the User model and stores which users follow one another. Message: Analagous to a tweet. The Message model model stores the text content of the tweet, when it was created, and who posted it (foreign key to User). If you like UML, these are the tables and relationships: 12 Chapter 1. Contents: peewee Documentation0 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation
Release 3.5.0Implementing Many to Many Self-joins Performance Techniques Query operators Three valued logic Adding user-defined operators Expressions SQL Functions SQL Helper Security and SQL Injection API Documentation Extensions Getting started APIs Additional Features Playhouse, extensions to Peewee SqliteQ Sqlite User-Defined Functions apsw, an advanced sqlite driver Sqlcipher backend Postgresql Extensions MySQL Extensions correspond to the table’s columns. For the twitter clone, there are just three models: User: Represents a user account and stores the username and password, an email address for generating avatars using0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation
Release 3.5.0correspond to the table’s columns. For the twitter clone, there are just three models: User: Represents a user account and stores the username and password, an email address for generating avatars using account was created. Relationship: This is a utility model that contains two foreign-keys to the User model and stores which users follow one another. Message: Analagous to a tweet. The Message model model stores the text content of the tweet, when it was created, and who posted it (foreign key to User). If you like UML, these are the tables and relationships: 12 Chapter 1. Contents: peewee Documentation0 码力 | 282 页 | 1.02 MB | 1 年前3
共 16 条
- 1
- 2













