Registry / web-framework / django-zeal

django-zeal

JSON →
library2.2.1pypypiunverified

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.

pip install django-zeal
INSTALL
IMPORT
SIG · DJANGO-ZEAL
D
django-zeal
web-frameworkpythonv2.2.1
Install
1.5s avg
Import
—
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v2.2.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

zeal
✓ from django_zeal import zeal
✗ import zeal

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.

import zeal # must be imported before any model usage from myapp.models import Author # Example: triggers N+1 warning for author in Author.objects.all(): print(author.books.count())
Debug
Known issues
breakingIn v2.0.0, the import path changed from 'from zeal import' to just 'import zeal'. Old imports will raise ImportError.
fix
Replace 'from zeal import Zeal' or similar with 'import zeal'.
affects: >=2.0.0
gotchadjango-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.
fix
Ensure your queries use Django ORM (e.g., related_name, prefetch_related).
affects: all
deprecatedThe undocumented 'zeal.settings' configuration module is deprecated and will be removed in next major release.
fix
Use environment variable ZEAL_VERBOSE instead of zeal.settings.VERBOSE.
affects: >=2.0.0
gotchaImporting zeal after Django model classes are already defined may not catch all N+1s. It must be imported before any model import.
fix
Add 'import zeal' at the very top of manage.py or wsgi.py, before any project imports.
affects: all
Upgrade
Version history
2.2.1latest on PyPI · released May 27, 2026
Audit
Dependencies
DjangorequiredRequired - monkey-patches Django ORM
Agent activity
16 hits · last 30 days
node
16
Resources
django-zeal — pip install django-zeal · libregistry