basic database sharding
> I don't have the faintest idea of how query objects work under the hood, so I don't know if there's a way of extending some class to override this kind of behavior.

I'd suggest you take a deep dive into the code if you're considering implementing this kind of logic with peewee.

SQLite has a neat feature called "ATTACH" where you can attach different database files and access them, much like you might use separate schemas in Postgresql. Peewee supports this, though you'll need to do some work to reuse the same models across multiple schemas.

Query objects are just thin wrappers over cursor objects.
Hi,
I'm building some data logging application for which I'd like to use SQLite.
Data comes from a limited number of data sources, which could be considered as separate subdomains, so it would make sense to have a single database for each data source (each with the same schema).
Given the nature of the data, it would also make sense to have e.g. one database per day, so that log rotation could be easily performed by just deleting the oldest file.
On the other hand, I would like to be able to access all the data from all these databases with a single query for instance. 
Would there be a way of doing this with peewee? It doesn't really have to be super-optimized.
So for instance, a select() could simply loop over all databases return the union of all results.
An insert() would find the corresponding database or create one if it doesn't exist.
I don't have the faintest idea of how query objects work under the hood, so I don't know if there's a way of extending some class to override this kind of behavior.
Any suggestion?
Thank you!