Skip to main content

Django Snakeviz Profiling

PyPI - Version PyPI - Python Version


Django Snakeviz Profiling integrates snakeviz along with a db query display into a django middleware that can show results inline in your application.

No migrations are required nor do any extra url routes need to be added to your application, only requiring to install one piece of middleware.

Table of Contents

Installation

pip install django-snakeviz-profiling

In your settings file, add the following middleware as close to the top as possible to cover as much code as possible:

MIDDLEWARE = [
    "django_snakeviz_profiling.SnakevizProfilingMiddleware",
    ...
]

Add django_snakeviz_profiling to your installed apps:

INSTALLED_APPS = [
    ...
    "django_snakeviz_profiling",
]

Finally, add the following config setting:

SNAKEVIZ_PROFILING = "PLEASE_PROFILE_REQUESTS"

Usage

On any request, add the following GET parameter to your url:

SNAKEVIZ_PROFILING=PLEASE_PROFILE_REQUESTS

, and instead of the regular page, you will be presented with a profile output from the request.

Note that if django_snakeviz_profiling is used, individual requests will be dramatically slower, so be careful using this in prod!

License

django-snakeviz-profiling is distributed under the terms of the MIT license. Parts of the code comes from the Snakeviz Project under the BSD 3-Clause license, and is specifically identified as such.

Metadata

Release files for django-snakeviz-profiling 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-snakeviz-profiling 0.1.0
File Size Uploaded
django_snakeviz_profiling-0.1.0.tar.gz 270.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-snakeviz-profiling 0.1.0
File Interpreter ABI Platform
django_snakeviz_profiling-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 550.7 kB

Release files / django_snakeviz_profiling-0.1.0.tar.gz

Download URL django_snakeviz_profiling-0.1.0.tar.gz
Size 270.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f24459a139591636806af510cafdbcf7e36d721b599d5e724cb42a94f3316dc4
BLAKE2b-256 checksum
How to use checksums
e6450eedaea10517f7e8d201e5b3e0b7ca5e059c452d33d16a415c926ee2aa4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.24.1

Release files / django_snakeviz_profiling-0.1.0-py3-none-any.whl

Download URL django_snakeviz_profiling-0.1.0-py3-none-any.whl
Size 280.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd511d631a9e7e4dbd1ee6215a7d06bf6af130d31d4be0e5cc31568479eca988
BLAKE2b-256 checksum
How to use checksums
e8b7794f1e862350a44b337b2b43d3612e4181f5173abfc3275f1b57ab8ccd9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.24.1

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page