flask-request-id

Extract yourself some Request IDs.


License
Other
Install
pip install flask-request-id==0.1

Documentation

flask-request-id

Make Request IDs available to your app, and also send one back to the client.

Usage

So simple.

from flask import Flask
from flask_request_id import RequestID

app = Flask(__name__)
request = RequestID(app)

You can then access the IDs in various ways.

As part of the module

>>> flask_request_id.ids
['abc123']

As part of the extension instance

>>> request.id
'abc123'

Testing:

$ pip install tox
$ tox
  • This takes care of py.test and all the other craziness.

Contributing:

send me pull requests & doritos.