Hey Paul - There are a couple of implementations I'm aware of:
https://github.com/stphivos/django-mock-queries https://github.com/dcramer/mock-django Neither are a complete implementation of the QuerySet API, and I think this is because the QuerySet API surface is _huge_. Implementing the entire API would be a monumental task (especially if you start wanting to implement some of the more complex operations, like annotate/aggregate). At a certain point, it because easier to just use a real database -- most people use SQLite at that point. It's certainly _possible_ to implement a in-memory datastore, and it might be pretty useful. It's just pretty dang hard to do more than the first 20% or so. Jacob On Tue, Mar 7, 2017 at 6:13 AM, <p...@dabapps.com> wrote: > Hi, > > It would be really convenient for me if there was an implementation of the > QuerySet API which instead of using a database as its data source, used > in-memory model instance that had not been persisted to the database at all. > > I looked around and found nothing like this. > > Is this because nothing like this exists? Is it because it's a terrible > idea for a reason that's not obvious to me? Would it not be awesome for the > API for interacting with collections of in-memory instances and with a > database-backed collection to be the same? > > Many thanks, > > Paul > > -- > You received this message because you are subscribed to the Google Groups > "Django developers (Contributions to Django itself)" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com. > To post to this group, send email to django-developers@googlegroups.com. > Visit this group at https://groups.google.com/group/django-developers. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-developers/d4f7c142-5d3f-4158-98bb- > 1e2171f0e63e%40googlegroups.com > <https://groups.google.com/d/msgid/django-developers/d4f7c142-5d3f-4158-98bb-1e2171f0e63e%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAK8PqJEW_OiKjHjusVOEgSSKjzHy5gXZXV9Hi8yB2E0RmZGsPg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.