Bulk inserts Inserting rows in batches Alternatives Bulk-loading from another table Bulk inserts There are a couple of ways you can load lots of data quickly. The naive appr...
Optimistic Locking Optimistic Locking Optimistic locking is useful in situations where you might ordinarily use aSELECT FOR UPDATE (or in SQLite, BEGIN IMMEDIATE). For example,...
MySQL Extensions MySQL Extensions Peewee provides an alternate database implementation for using the mysql-connector driver. The implementation can be found in playhouse.mysql...
Retrieving Data Getting single records Lists of records Sorting Combining filter expressions Aggregates and Prefetch SQL Functions Retrieving Data The real strength of ou...
Create or get Create or get Peewee has one helper method for performing “get/create” type operations: Model.get_or_create() , which first attempts to retrieve the matching row...
Create or get Create or get Peewee has one helper method for performing “get/create” type operations:Model.get_or_create() , which first attempts to retrieve the matchingrow. ...
MySQL Extensions MySQL Extensions Peewee provides an alternate database implementation for using themysql-connector driver. Theimplementation can be found in playhouse.mysql_e...
Signal support Connecting handlers Signal API Signal support Models with hooks for signals (a-la django) are provided inplayhouse.signals . To use the signals, you will need ...
Test Utils Test Utils Contains utilities helpful when testing peewee projects. class count_queries ([only_select=False]) Context manager that will count the number of queries...