Lightweight performance devbar for Django
Project description
django-devbar
[!WARNING] This package is experimental and may introduce breaking changes in minor versions.
Lightweight performance devbar for Django. Shows DB query count, query duration, application time, and detects duplicate queries with visual severity indicators.
Showcase
Normal operation – showing query count, duration, and application time:
Duplicate queries detected – severity indicator and details shown:
[optional] Chrome extension - showing detailed metrics in DevTools panel:
Motivation
While Django Debug Toolbar is a proven tool trusted by countless projects, django-devbar explores a different approach to development debugging:
- Minimal setup — just add middleware, nothing else required
- Browser DevTools integration — Chrome extension panel works with any response type, including JSON
- Zero extra dependencies — only requires Django
- Lower overhead — no extra requests to debug endpoints
- Non-intrusive — HTML bar is optional; works via headers and DevTools panel alone
Installation
# Using uv (recommended)
uv add --dev django-devbar
# Or using pip
pip install django-devbar
Add to your middleware as early as possible, but after any middleware that encodes the response (e.g., GZipMiddleware):
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"django_devbar.DevBarMiddleware",
# ...
]
Configuration
All settings are optional. Configure via a DEVBAR dict in your Django settings:
DEVBAR = {
"POSITION": "bottom-right", # bottom-right (default), bottom-left, top-right, top-left
"SHOW_BAR": None, # follows DEBUG; set True/False to override
"ENABLE_DEVTOOLS_DATA": None, # follows DEBUG; set True/False to override
}
Response Headers
Django DevBar adds HTTP response headers with performance metrics:
- Server-Timing (always present) – Standard HTTP header with database, application, and total time metrics. Visible in Chrome DevTools Network tab under Timing.
An additional header is included by default in DEBUG mode:
- DevBar-Data - JSON header with comprehensive metrics including duplicate query details
This is useful for:
- API endpoints where the HTML overlay can't be displayed
- Automated testing to assert performance metrics (e.g., fail CI if query count exceeds a limit)
- Browser extensions that need detailed duplicate query information
Server-Timing format
Server-Timing: db;dur=87.50, app;dur=41.30, total;dur=128.80
Chrome Extension
View Django DevBar metrics directly in Chrome DevTools with the official extension.
See chrome-extension/README.md for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_devbar-0.5.0.tar.gz.
File metadata
- Download URL: django_devbar-0.5.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b0165271a1a2b724a7155d1ad4154a73318a653b01e1e3b9112d9180e4d9eb2
|
|
| MD5 |
2a52d521e1ab6e6309d9898537c86c60
|
|
| BLAKE2b-256 |
4ab0917674f06bac062ba484785b3ea6982e1d5c8a1f2e89b52f28a0bc888dd5
|
Provenance
The following attestation bundles were made for django_devbar-0.5.0.tar.gz:
Publisher:
release.yml on amureki/django-devbar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_devbar-0.5.0.tar.gz -
Subject digest:
0b0165271a1a2b724a7155d1ad4154a73318a653b01e1e3b9112d9180e4d9eb2 - Sigstore transparency entry: 813095347
- Sigstore integration time:
-
Permalink:
amureki/django-devbar@c310a8d2ae6af7c37a3e631d56c53b37785d3f4a -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/amureki
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c310a8d2ae6af7c37a3e631d56c53b37785d3f4a -
Trigger Event:
release
-
Statement type:
File details
Details for the file django_devbar-0.5.0-py3-none-any.whl.
File metadata
- Download URL: django_devbar-0.5.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1499c796699c051913c198b137bebf3f977f489d9f105523bdf5bd384341fcc
|
|
| MD5 |
ffaa933ccb79c073e3a24ffededc0edf
|
|
| BLAKE2b-256 |
8bcdc27ebc3007e0931589c2b6716b68bfb90debe5e6f6e4ed68b57c17d7ce98
|
Provenance
The following attestation bundles were made for django_devbar-0.5.0-py3-none-any.whl:
Publisher:
release.yml on amureki/django-devbar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_devbar-0.5.0-py3-none-any.whl -
Subject digest:
a1499c796699c051913c198b137bebf3f977f489d9f105523bdf5bd384341fcc - Sigstore transparency entry: 813095352
- Sigstore integration time:
-
Permalink:
amureki/django-devbar@c310a8d2ae6af7c37a3e631d56c53b37785d3f4a -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/amureki
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c310a8d2ae6af7c37a3e631d56c53b37785d3f4a -
Trigger Event:
release
-
Statement type: