flask-request-id-header
Python Flask middleware to ensure all requests have a request ID header
Decision gist · record as of 2026-08-14
Yes, if you need a minimal, zero-configuration request ID middleware for a Flask application and can accept that the package is unmaintained. It has no known vulnerabilities, low install friction, and a simple, stable API. No, if you require active maintenance, support for recent Flask versions, or a more feature-rich tracing solution. Verify the Open Government Licence v3.0 is acceptable for your use case.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Installation is straightforward with low friction—only flask as a runtime dependency.
- However, the package is abandoned: last release was 2019-03-02, last commit 2022-12-27, and no maintenance activity since.
- Use only if you need a minimal, stable request ID middleware and can maintain it yourself if needed.
License · maintenance · safety
Open Government Licence v3.0 (unclear) — Licensed under Open Government Licence v3.0 with unclear SPDX mapping. Verify compatibility with your project's license requirements before use, particularly in proprietary or commercial contexts.
last release 2019-03-02 (2722 days) · last repo commit 2022-12-27 · 9 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 101,696 downloads/mo, #12,921 on PyPI
Alternatives
Verify before relying
pip install flask-request-id-header
from flask import Flask
from flask_request_id_header.middleware import RequestID
app = Flask(__name__)
RequestID(app)
@app.route('/')
def hello():
return 'hello'- Whether Open Government Licence v3.0 is compatible with your project's licensing model
- Whether the package works with current Flask versions (last tested in 2019)
- Whether UUID v4 generation for request IDs meets your security and uniqueness requirements
What it is and what it does
Flask Request ID Header is a lightweight middleware that ensures every HTTP request to a Flask application carries a unique X-Request-ID header. If a request arrives without one, the middleware generates a UUID v4 and adds it; if one exists but lacks a UUID v4 value, the middleware appends one. This enables request tracing across microservices, load balancers, and reverse proxies—critical for correlating log entries and debugging distributed systems.
The middleware integrates directly into Flask's request handling with no required configuration. It exposes the current request ID via the request environment (HTTP_X_REQUEST_ID) so your application code can access it for logging or forwarding. You can optionally set a REQUEST_ID_UNIQUE_VALUE_PREFIX config to treat certain prefixed IDs as already unique, preventing unnecessary appends. The package is minimal and stable but unmaintained since 2019.
Use it for
- Trace a single user request through multiple microservices by including the X-Request-ID in logs at each layer.
- Correlate errors in a load-balanced Flask deployment by extracting the request ID from response headers.
- Include request IDs in application logs using a custom logging formatter to link log entries to specific user actions.
- Pass request IDs downstream to external APIs or databases to maintain end-to-end request context in distributed systems.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need a minimal, zero-configuration request ID middleware for a Flask application and can accept that the package is unmaintained.
It has no known vulnerabilities, low install friction, and a simple, stable API. No, if you require active maintenance, support for recent Flask versions, or a more feature-rich tracing solution. Verify the Open Government Licence v3.0 is acceptable for your use case.
Install
flask-request-id-header on PyPI
Before you install
Installation is straightforward with low friction—only flask as a runtime dependency. However, the package is abandoned: last release was 2019-03-02, last commit 2022-12-27, and no maintenance activity since. Use only if you need a minimal, stable request ID middleware and can maintain it yourself if needed.
License in practice
Licensed under Open Government Licence v3.0 with unclear SPDX mapping. Verify compatibility with your project's license requirements before use, particularly in proprietary or commercial contexts.
Quickstart
pip install flask-request-id-header
from flask import Flask
from flask_request_id_header.middleware import RequestID
app = Flask(__name__)
RequestID(app)
@app.route('/')
def hello():
return 'hello'
Verify before relying
- Whether Open Government Licence v3.0 is compatible with your project's licensing model
- Whether the package works with current Flask versions (last tested in 2019)
- Whether UUID v4 generation for request IDs meets your security and uniqueness requirements
Package facts
| License | Open Government Licence v3.0 unclear |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageflask |
| Maintenance | Abandoned 2,722 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 101,696 / month, #12,921 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableFramework :: FlaskIntended Audience :: DevelopersLicense :: Other/Proprietary LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: flask_request_id_header-0.1.1-py3-none-any.whl
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 › “flask request id middleware”
- flask-request-id-headerFlask middleware that automatically adds or validates an X-Request-ID…
- Flask-Log-Request-IDExtracts request IDs from incoming HTTP requests (from load balancers…
- asgi-correlation-idASGI middleware that reads or generates correlation IDs for incoming…
Give your agent the search over MCP, or paste the wish link into any chat.
More Dynamic Content packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Soupsieve is a CSS selector library designed to work with Beautiful Soup 4 to select, match, and filter HTML and XML elements using modern CSS selectors from CSS level 1 through CSS level 4 specifications.
Install it if you use Beautiful Soup for HTML or XML parsing and want modern CSS selector support.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
Flask is a lightweight WSGI web application framework for building web applications in Python, from simple single-page sites to complex multi-route applications.
Mako compiles Python-embedded templates into Python modules for fast rendering, supporting layout inheritance, custom functions, and direct Python expressions within template syntax.
See also django-request-id · asgi-correlation-id · Flask-Log-Request-ID · django-log-request-id · starlette-context · opencensus-ext-flask · opentelemetry-instrumentation-flask · flask-talisman · flask-cors · django-guid