def after_this_request(f):
    from flask import g

    if not hasattr(g, 'after_request_callbacks'):
        g.after_request_callbacks = []
    g.after_request_callbacks.append(f)
    return f
Decorator for functions to run after request has been processed
dataset/ETHPy150Open kofrasa/flask-apputils/flask_apputils/decorators.py/after_this_request