django-cprofile-middleware
Easily add cProfile profiling to django views.
Decision gist · record as of 2026-08-14
No. The package is abandoned (last release 2020-02-20, last commit 2021-08-18) with no active maintenance or security updates. Modern Django and Python versions may have broken compatibility. For profiling Django views, prefer actively maintained alternatives.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Django with DEBUG=True and (by default) an authenticated user with is_staff=True; compatibility with modern Django and Python versions is unverified
- High install friction with no runtime dependencies.
- The package is abandoned—last commit was 2021-08-18 and last release 2020-02-20.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you may use, modify, and distribute this package freely with minimal restrictions.
last release 2020-02-20 (2367 days) · last repo commit 2021-08-18 · 153 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 90,241 downloads/mo, #13,609 on PyPI
Alternatives
Verify before relying
# Install
pip install django-cprofile-middleware
# In settings.py, add to MIDDLEWARE:
MIDDLEWARE = [
...,
'django_cprofile_middleware.middleware.ProfilerMiddleware'
]
# Then visit http://localhost:8000/your-view/?prof while logged in as staff- Compatibility with modern Django versions (1.10+ middleware API is mentioned, but no upper bound specified)
- Python version support is unspecified; may not work with recent Python releases
- Whether the package works with Django's async views or only synchronous handlers
What it is and what it does
django-cprofile-middleware is a Django middleware that wraps request handling with Python's cProfile profiler. When you add `?prof` to any URL while logged in as a staff user (by default), the middleware captures function-call timing data and displays it inline, letting you see which functions consumed the most CPU time during that request. It supports sorting results by different metrics and downloading the profile data for visualization in external tools.
The middleware activates only when Django's DEBUG setting is True and (by default) when the requesting user has staff privileges. It's a development-only tool for identifying performance bottlenecks without manual instrumentation.
Use it for
- Identify slow database queries or expensive function calls in a Django view during local development
- Compare performance across different code paths by profiling the same endpoint with different parameters
- Export profile data for detailed visualization of call hierarchies in external profiling viewers
- Debug performance regressions by profiling a view before and after code changes
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
The package is abandoned (last release 2020-02-20, last commit 2021-08-18) with no active maintenance or security updates. Modern Django and Python versions may have broken compatibility. For profiling Django views, prefer actively maintained alternatives.
Install
django-cprofile-middleware on PyPI
Before you install
High install friction with no runtime dependencies. The package is abandoned—last commit was 2021-08-18 and last release 2020-02-20. No active maintenance or security updates.
Requires Django with DEBUG=True and (by default) an authenticated user with is_staff=True; compatibility with modern Django and Python versions is unverified
License in practice
MIT license is permissive; you may use, modify, and distribute this package freely with minimal restrictions.
Quickstart
# Install
pip install django-cprofile-middleware
# In settings.py, add to MIDDLEWARE:
MIDDLEWARE = [
...,
'django_cprofile_middleware.middleware.ProfilerMiddleware'
]
# Then visit http://localhost:8000/your-view/?prof while logged in as staff
Verify before relying
- Compatibility with modern Django versions (1.10+ middleware API is mentioned, but no upper bound specified)
- Python version support is unspecified; may not work with recent Python releases
- Whether the package works with Django's async views or only synchronous handlers
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Abandoned 2,367 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 90,241 / month, #13,609 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Framework :: Django |
Evidence: django-cprofile-middleware-1.0.5.tar.gz
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 view profiling”
- django-cprofile-middlewareMiddleware that profiles Django view execution using cProfile and…
- django-silkSilk intercepts and profiles HTTP requests, database queries, and…
- django-debug-toolbarDisplays debug information panels in Django applications during…
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 django-silk · fastapi-profiler · pyprof2calltree · django-slowtests · line-profiler · pytest-profiling · flameprof · yappi · django-debug-toolbar-template-profiler · django-queryinspect