{"categories":[{"label":"Quality Assurance","url":"https://skillfed.io/packages/category/software-development-quality-assurance/3"}],"enrichment":{"capability":"Prevents unintended database queries in Django views and serializers by enforcing explicit query execution zones through context managers and decorators.","skillfed_tags":["django-performance","query-debugging","orm-control"],"use_cases":["Wrap template rendering in views to catch N+1 query problems before production.","Decorate serializer methods to prevent REST Framework endpoints from unexpectedly querying during serialization.","Enforce architectural boundaries where certain functions should never trigger database access.","Debug performance regressions by identifying which code paths execute unexpected queries.","Use as a development-time safety net to catch query problems introduced by template or serializer changes."],"what_it_does":"django-zen-queries is a Django debugging and design tool that makes database query execution explicit rather than implicit. It provides context managers and decorators that prevent code from running queries unless explicitly allowed, forcing developers to think about when and where data is fetched versus rendered. The package addresses a fundamental Django ORM weakness: lazy evaluation hides query execution, making it easy to accidentally trigger the N+1 problem when templates or serializers access related data without proper prefetching.\n\nThe package includes a queries_disabled context manager and decorator, a fetch utility to force queryset evaluation, and integration helpers for Django templates and Django REST Framework serializers. It does not optimize queries itself\u2014instead, it fails loudly when queries run where they shouldn't, pushing developers to design code that separates data fetching from data rendering.","worth_installing":"Yes, if you develop Django applications and want to catch N+1 and other implicit query problems during development. The package is lightweight, actively maintained, and widely used. Install it in development environments to enforce explicit query boundaries; the overhead is negligible for a debugging tool. Most teams use it as a development-time safety net rather than in production."},"id":"django-zen-queries","links":{"html":"https://skillfed.io/packages/django-zen-queries","md":"https://skillfed.io/packages/django-zen-queries.md","pypi":"https://pypi.org/project/django-zen-queries/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2021-07-27","license_spdx":null,"license_treatment":"permissive","name":"django-zen-queries","python_support":"supports_current","summary":"Explicit control over query execution in Django applications."},"popularity":{"monthly_downloads":155817,"position":10799,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.1.0"}
