Make Request IDs available to your app, and also send one back to the client.
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.
>>> flask_request_id.ids
['abc123']
>>> request.id
'abc123'
- use tox.
$ pip install tox
$ tox
- This takes care of py.test and all the other craziness.
send me pull requests & doritos.