{"id":23612,"library":"django-zeal","title":"django-zeal","description":"Detect N+1 queries in your Django application. v2.1.0 supports Django 4.2+ and Python >=3.9. Maintenance mode: no new features, bug fixes only. GitHub is archived.","status":"maintenance","version":"2.1.0","language":"python","source_language":"en","source_url":"https://github.com/taverentech/django-zeal","tags":["django","n-plus-one","query-detection","orm","performance"],"install":[{"cmd":"pip install django-zeal","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required - monkey-patches Django ORM","package":"Django","optional":false}],"imports":[{"wrong":"import zeal","symbol":"zeal","correct":"from django_zeal import zeal"}],"quickstart":{"code":"import zeal  # must be imported before any model usage\nfrom myapp.models import Author\n# Example: triggers N+1 warning\nfor author in Author.objects.all():\n    print(author.books.count())\n","lang":"python","description":"Simply import zeal at the top of your Django app entry point (e.g., settings.py or manage.py). It will automatically log N+1 queries detected during request/response cycle."},"warnings":[{"fix":"Replace 'from zeal import Zeal' or similar with 'import zeal'.","message":"In v2.0.0, the import path changed from 'from zeal import' to just 'import zeal'. Old imports will raise ImportError.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Ensure your queries use Django ORM (e.g., related_name, prefetch_related).","message":"django-zeal only works with the Django ORM's internal query mechanics; it does NOT detect N+1s from raw SQL or third-party DB backends.","severity":"gotcha","affected_versions":"all"},{"fix":"Use environment variable ZEAL_VERBOSE instead of zeal.settings.VERBOSE.","message":"The undocumented 'zeal.settings' configuration module is deprecated and will be removed in next major release.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Add 'import zeal' at the very top of manage.py or wsgi.py, before any project imports.","message":"Importing zeal after Django model classes are already defined may not catch all N+1s. It must be imported before any model import.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'+1':6 '3.9':18 '4.2':15 'applic':11 'archiv':29 'bug':24 'detect':4,37 'django':2,10,14,30 'django-z':1 'featur':23 'fix':25 'github':27 'mainten':19 'mode':20 'n':5,32 'n-plus-on':31 'new':22 'one':34 'orm':38 'perform':39 'plus':33 'python':17 'queri':7,36 'query-detect':35 'support':13 'v2.1.0':12 'zeal':3","created_at":"2026-05-01T08:08:41.922894+00:00","updated_at":"2026-05-01T08:08:41.922894+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nModuleNotFoundError: No module named 'django_zeal'"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.2.1","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/django-zeal/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","database","testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}