Skip to main content

A simple Django SQL Query Middleware package

Project description

Django SQL Query Logger

django installable package for logger middleware

Features

  • QueryLoggerMiddleware: Logs request/response query details

Installation

pip install django-sql-query-logger

Usage

Add the middleware to your Django settings:

MIDDLEWARE = [
    # ... other middleware
    "sql_query_middlewares.middlewares.QueryLoggerMiddleware",
    # ... other middleware
]

Configuration

No additional configuration required. The middleware will automatically:

  • Log request information to the Django logger
  • Add processing time headers to responses
  • Number of sql queries has done in request response cycle

Requirements

  • Django >= 3.2
  • Python >= 3.8

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_sql_query_logger-1.0.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_sql_query_logger-1.0.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file django_sql_query_logger-1.0.0.tar.gz.

File metadata

  • Download URL: django_sql_query_logger-1.0.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for django_sql_query_logger-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3d4982f7b3e2b7ff3813c04e30a761de53c4b2deb389e652422cfaeff0d96f3b
MD5 7ef6743305e29e900c4334b5184c29c2
BLAKE2b-256 3483cdb5680b5077e3b6b51958d2e49150a57bfa751c259a01ac4a16b5df9e20

See more details on using hashes here.

File details

Details for the file django_sql_query_logger-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_sql_query_logger-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0a16b3568ef54ddd34c6e8ff7fdad8fb83e0ff6e2cc4727cf4f73c3ea4a758f
MD5 a069cdf11c8800f9c89a721c01c12cf0
BLAKE2b-256 874c0300e922b36dc611b377313086944294ce66651846dc5018ebd9c0e612f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page