@app.teardown_request
def teardown_request(exception):
    db.close_db_connection(g.db)


## helpers
Close database connection after each request.
dataset/ETHPy150Open ferhensil/flask-example/main.py/teardown_request