Lightweight performance devbar for Django
Project description
django-devbar
Lightweight performance devbar for Django. Shows DB query count, query duration, and response time.
Installation
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
# Position: bottom-right, bottom-left, top-right, top-left (default: bottom-right)
DEVBAR_POSITION = "top-left"
# Show HTML overlay (default: DEBUG)
DEVBAR_SHOW_BAR = True
# Add X-DevBar-* response headers (default: False)
DEVBAR_SHOW_HEADERS = True
Response Headers
When DEVBAR_SHOW_HEADERS = True, performance metrics are added as HTTP response headers. This is useful for:
- API endpoints where the HTML overlay can't be displayed
- Automated testing to assert performance thresholds (e.g., fail CI if query count exceeds a limit)
- Monitoring tools that can capture and aggregate header values
Headers included:
| Header | Description |
|---|---|
X-DevBar-Query-Count |
Number of database queries executed |
X-DevBar-Query-Duration |
Total time spent in database queries (ms) |
X-DevBar-Response-Time |
Total request-response cycle time (ms) |
X-DevBar-Has-Duplicates |
Present (value 1) if duplicate queries detected |
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.1.1.tar.gz.
File metadata
- Download URL: django_devbar-0.1.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e0d8290fa8b73946665086dbf8ad1ebdbcfb8bec0d5b9991425b664c72215e2
|
|
| MD5 |
816d728fe0ea5c6f0560bd74033fceee
|
|
| BLAKE2b-256 |
8333917df672a0e4039debfe0f39d7285a028aa997879a01c7c2c37de6634218
|
Provenance
The following attestation bundles were made for django_devbar-0.1.1.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.1.1.tar.gz -
Subject digest:
7e0d8290fa8b73946665086dbf8ad1ebdbcfb8bec0d5b9991425b664c72215e2 - Sigstore transparency entry: 751842573
- Sigstore integration time:
-
Permalink:
amureki/django-devbar@b5c4cb52d829388753980920728f961126e64763 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/amureki
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b5c4cb52d829388753980920728f961126e64763 -
Trigger Event:
release
-
Statement type:
File details
Details for the file django_devbar-0.1.1-py3-none-any.whl.
File metadata
- Download URL: django_devbar-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.8 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 |
acd39fb075968a00bce7391e8a5a566d4e1aefe5b7ffc15969e9ff0e97227e39
|
|
| MD5 |
c1c0e82c49cb2ff74f61ea548fe2565a
|
|
| BLAKE2b-256 |
0b3587ec392a3157c5bc5179b503032da78b16ed538d91f77f5e6e336b7cef3b
|
Provenance
The following attestation bundles were made for django_devbar-0.1.1-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.1.1-py3-none-any.whl -
Subject digest:
acd39fb075968a00bce7391e8a5a566d4e1aefe5b7ffc15969e9ff0e97227e39 - Sigstore transparency entry: 751842583
- Sigstore integration time:
-
Permalink:
amureki/django-devbar@b5c4cb52d829388753980920728f961126e64763 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/amureki
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b5c4cb52d829388753980920728f961126e64763 -
Trigger Event:
release
-
Statement type: