django-zeal
Detect N+1s in your Django app
Decision gist · record as of 2026-08-14
Yes. django-zeal is a low-friction, actively maintained tool with no dependencies that solves a real Django performance problem. Install it in development and test environments to catch N+1 queries early. The MIT license is clear, and the overhead is acceptable for non-production use. Not suitable for production deployment.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Django and Python 3.9 or later.
- Intended for development and test environments only; not for production use.
- Low friction: pure Python wheel with no runtime dependencies.
License · maintenance · safety
(unclear) — MIT license (clear permissive terms). Includes attribution to original nplusone author Joshua Carp and current maintainer Tao Bojlén.
last release 2026-07-24 (21 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 133,810 downloads/mo, #11,494 on PyPI
Alternatives
Verify before relying
pip install django-zeal
# In Django settings.py (development only):
if DEBUG:
INSTALLED_APPS.append("zeal")
MIDDLEWARE.append("zeal.middleware.zeal_middleware")
# Or with a test framework:
from zeal import zeal_context
with zeal_context():
# your code here
pass- Whether the package detects all forms of N+1 queries or only the specific patterns mentioned (missing prefetches, .defer(), .only(), .get())
- Compatibility with specific Django versions (not specified in fact sheet)
- Current test coverage and stability metrics beyond 'well-tested' claim
What it is and what it does
django-zeal is a Django development tool that catches N+1 query problems—situations where the same database query runs multiple times when it should run once. It monitors queries during web requests, Celery tasks, and test runs, detecting N+1s caused by missing prefetches or misuse of .defer(), .only(), and .get() methods. The tool integrates via Django middleware and signals, raising errors or logging warnings when problems are found.
It works by tracking which queries execute and how many times, with a configurable threshold for what counts as an N+1. You can allowlist specific model/field combinations, temporarily ignore sections of code, or listen to Django signals to handle detections globally. The package has no runtime dependencies and adds minimal overhead, making it practical for continuous use in development and test suites.
Use it for
- Catch N+1 query bugs during Django test runs before code review or deployment
- Monitor Celery background tasks for database query inefficiencies using signal hooks
- Identify missing prefetch_related() calls in view code with precise file and line numbers
- Allow-list known false positives or intentional query patterns to keep test suites clean
- Debug query performance regressions by enabling full call stacks with ZEAL_SHOW_ALL_CALLERS
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
django-zeal is a low-friction, actively maintained tool with no dependencies that solves a real Django performance problem. Install it in development and test environments to catch N+1 queries early. The MIT license is clear, and the overhead is acceptable for non-production use. Not suitable for production deployment.
Install
django-zeal on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained as of 21 days ago. Designed to run only in development and test environments with documented 3-5% overhead.
Requires Django and Python 3.9 or later. Intended for development and test environments only; not for production use.
License in practice
MIT license (clear permissive terms). Includes attribution to original nplusone author Joshua Carp and current maintainer Tao Bojlén.
Quickstart
pip install django-zeal
# In Django settings.py (development only):
if DEBUG:
INSTALLED_APPS.append("zeal")
MIDDLEWARE.append("zeal.middleware.zeal_middleware")
# Or with a test framework:
from zeal import zeal_context
with zeal_context():
# your code here
pass
Verify before relying
- Whether the package detects all forms of N+1 queries or only the specific patterns mentioned (missing prefetches, .defer(), .only(), .get())
- Compatibility with specific Django versions (not specified in fact sheet)
- Current test coverage and stability metrics beyond 'well-tested' claim
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 21 days since the last release |
| First released | |
| Downloads | 133,810 / month, #11,494 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: django_zeal-2.2.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “django n+1 query detection”
- django-zealDetects N+1 query problems in Django applications by monitoring…
- django-queryinspectDjango middleware that logs and reports SQL query statistics for each…
- nplusoneDetects n+1 query problems in Python ORMs (Django, SQLAlchemy,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Quality Assurance packages
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
Ruff is a Python linter and code formatter written in Rust that combines linting, formatting, and code fixing into a single tool, replacing Flake8, Black, isort, and related utilities.
Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.
Black reformats Python source code to a consistent style by parsing entire files and rewriting them according to an opinionated, deterministic set of rules, eliminating manual formatting decisions.
pytest-xdist distributes pytest tests across multiple CPU cores or machines to speed up test execution, with the simplest usage being `pytest -n auto` to spawn workers equal to available CPUs.
Install it if your test suite takes long enough that parallelization would save meaningful time.
Validates AWS CloudFormation templates in YAML or JSON format against resource provider schemas and best practices, checking property values and configuration correctness.
Install it if you work with CloudFormation templates.
See also nplusone · django-querycount · django-queryinspect · drf-api-logger · django-perf-rec · django-celery-results · django-easy-audit · sqlalchemy-mixins · pytest-celery · django-ses