Setting the database at run-time Setting the database at run-time We have seen three ways that databases can be configured with Peewee: # The usual way: db = SqliteDataba...
Implementing Many to Many ManyToManyField Implementing Many to Many Peewee provides a field for representing many-to-many relationships, much like Django does. This feature wa...
Indexes and Constraints Single-column indexes and constraints Multi-column indexes Advanced Index Creation Table constraints Indexes and Constraints Peewee can create index...
Models and Fields Fields Field types table Field initialization arguments Some fields take special parameters… Default field values ForeignKeyField DateTimeField, DateField an...
Selecting multiple records Iterating over large result-sets Selecting multiple records We can use Model.select() to retrieve rows from the table. When youconstruct a SELECT ...
Date math Date math Each of the databases supported by Peewee implement their own set of functionsand semantics for date/time arithmetic. This section will provide a short sce...
Adding user-defined operators Adding user-defined operators Because I ran out of python operators to overload, there are some missing operators in peewee, for instance modulo ....
Adding user-defined operators Adding user-defined operators Because I ran out of python operators to overload, there are some missing operators in peewee, for instance modulo ....
pwiz, a model generator pwiz, a model generator pwiz is a little script that ships with peewee and is capable of introspecting an existing database and generating model code s...
Diving into the code Models Creating tables Establishing a database connection Making queries Creating new objects Performing subqueries Other topics of interest Diving ...