{"repo":"vintasoftware/django-virtual-models","free":true,"listed":false,"github":"https://github.com/vintasoftware/django-virtual-models","clone":"git clone https://github.com/vintasoftware/django-virtual-models.git","description":"Improve performance and maintainability with a prefetching layer in your Django project","language":"Python","stars":154,"topics":["django","django-rest-framework","orm","performance","python"],"license":"MIT","category":"databases-storage","readme_excerpt":"Django Virtual Models Improve performance and maintainability with a prefetching layer in your Django / Django REST Framework project &nbsp; &nbsp; &nbsp; --- Documentation : https://vintasoftware.github.io/django-virtual-models/ Example project : https://github.com/vintasoftware/django-virtual-models/tree/main/example Source Code : https://github.com/vintasoftware/django-virtual-models --- Django Virtual Models introduces a new \"prefetching layer\" to Django codebases that assists developers to express complex read logic without sacrificing maintainability, composability and performance. A Virtual Model allows developers to declare all nesting they need along with all annotations, prefetches, and joins in a single declarative class. When implementing Django REST Framework serializers, developers need to be careful to avoid causing the N+1 selects problem due to missing prefetch related or select related calls on the associated queryset. Additionaly, developers must not miss annotate calls for fields that are computed at queryset-level. With Virtual Models integration with DRF, if you change a DRF Serializer, you won't forget to modify the associated queryset with additional annotations, prefetches, and joins. If you do forget to update the queryset, Django Virtual Models will guide you by raising friendly exceptions to assist you to write the correct Virtual Model for the serializer you're changing. This guidance will prevent N+1s and missing annotations in all serializers th","default_branch":null,"files":null,"tree":[],"storefront":"/r/vintasoftware","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/vintasoftware/django-virtual-models/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}