The code base for Boxtribute 2.0, a humanitarian aid web application making it easy to source, store and distribute goods to people in need in a fair and dignified way
To reduce the amount of memory used by peewee when iterating over a
query, use the iterator() method. This method allows you to iterate
without caching each model returned, using much less memory when
iterating over large result sets.
cf. http://docs.peewee-orm.com/en/latest/peewee/querying.html#iterating-over-large-result-sets