Skip to main content

Django Query Profiler

A simple Django middleware to log SQL queries executed during a request. This middleware is active only when DEBUG = True.

Installation

pip install bear-django-query-profiler

Usage

  1. Add the middleware to your MIDDLEWARE list in settings.py. It should be placed after any other middleware that might generate queries.

    # settings.py
    MIDDLEWARE = [
        # ... other middleware
        'query_profiler.middleware.QueryProfilerMiddleware',
    ]
    
  2. (Optional) You can specify a list of string patterns to ignore in the logs. Any query containing one of these patterns will not be logged.

    # settings.py
    QUERY_PROFILER_IGNORE_PATTERNS = ['global_system_logs', 'django_session']
    
  3. Ensure your logging is configured to display DEBUG level messages.

Metadata

Release files for bear-django-query-profiler 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 bear-django-query-profiler 0.1.0
File Size Uploaded Provenance Actions
bear_django_query_profiler-0.1.0.tar.gz 2.4 kB Without provenance Details for bear_django_query_profiler-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bear-django-query-profiler 0.1.0
File Interpreter ABI Platform Actions
bear_django_query_profiler-0.1.0-py3-none-any.whl Python 3 none any Details for bear_django_query_profiler-0.1.0-py3-none-any.whl

Total release size: 5.2 kB

Release files / bear_django_query_profiler-0.1.0.tar.gz

Download URL bear_django_query_profiler-0.1.0.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d1747bd624fca7f1c6067664923c42188d3997afa2a623acee2450c937c22cf2
BLAKE2b-256 checksum
How to use checksums
235feca1a98466feb17e4e2b388ff1d8c358a2ad21eda1be1e55d49feed6983f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

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

Download URL bear_django_query_profiler-0.1.0-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee660d92f201d58ce8e3aa979a355edae14cbb7b06abfc3729e5efd1674d642c
BLAKE2b-256 checksum
How to use checksums
aaf44c5516e1197b48c3e3bd409ef95256aa99f2de313d317501d53f11da6d44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Security for bear-django-query-profiler 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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