--- id: django-request-id version: "1.0.0" license: MIT license_treatment: permissive maintenance: abandoned --- # django-request-id — Augment each request with unique id for logging purposes License: permissive · Maintenance: abandoned · Downloads: 116.4K/mo ## What it is and what it does django-request-id is a Django middleware package that automatically assigns a unique identifier to each incoming HTTP request and makes it available throughout the request lifecycle. It integrates with Django's standard logging system via a custom filter, allowing you to include the request ID in log messages by adding a `%(request_id)` placeholder to your formatter. This enables correlation of log entries across your web server (Nginx, Apache, Heroku) and Django application, making it easier to trace a single user's request through your system. The package retrieves the request ID from an HTTP header (typically `X-Request-ID`, configurable via `REQUEST_ID_HEADER` setting) if your web server provides one, or generates a unique ID automatically if not. It requires no external dependencies and integrates via a simple middleware registration and logging configuration. However, the package has not been maintained since 2021 and targets older Django and Python versions, so compatibility with current releases is uncertain. Use it for: - Correlate log entries between Nginx/Apache web server logs and Django application logs for a single request - Trace a user's request through multiple services or background tasks by passing the request ID as a header - Debug production issues by matching a specific request ID in server logs to corresponding application log entries - Implement request-scoped logging context in Django views and middleware without manual ID threading ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Attaches a unique request ID to each Django HTTP request and integrates it into Python logging, enabling request tracing across server and application logs. No. While the package is simple and has no dependencies, it is abandoned (last update 2021-01-11) and targets Django 1.8–1.10 and Python 2.7 / 3.3–3.5. Modern Django and Python versions are likely unsupported. For current projects, consider a maintained alternative or implement request ID tracking directly using Django's built-in logging context or third-party solutions actively maintained for modern Django. ## Install pip install django-request-id uv add django-request-id poetry add django-request-id ## Installing django-request-id Before you install: Installation is frictionless with no runtime dependencies. However, the package is abandoned—last commit was 2021-01-11 and it has not been updated for over 3 years. It targets Django 1.8–1.10 and Python 2.7 / 3.3–3.5, making it potentially incompatible with modern Django and Python versions. License in practice: Released under the MIT license (permissive), so you may use, modify, and distribute it freely in both open-source and commercial projects without restriction. Quickstart: # Install pip install django-request-id # In Django settings.py: INSTALLED_APPS = [ 'request_id', # ... ] MIDDLEWARE = [ 'request_id.middleware.RequestIdMiddleware', # ... ] # In a view: from django.http import HttpResponse def my_view(request): request_id = request.request_id return HttpResponse(f'Request ID: {request_id}') Requires Django and Python versions compatible with 1.8–1.10 and 2.7 / 3.3–3.5 respectively; modern Django and Python versions may not be supported. Verify before relying: - Whether the package works with Django versions released after 1.10 (2.0+, 3.x, 4.x, 5.x) - Whether the package is compatible with Python 3.6 and later versions - Current status of any community forks or maintained alternatives ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 116.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django request id logging, request tracing django, unique request identifier, django middleware logging, request correlation id, django log request tracking, request id middleware, request-tracing, logging-integration, abandoned [View on SkillFed](https://skillfed.io/packages/django-request-id) · [View on PyPI](https://pypi.org/project/django-request-id/)