def teardown_request(exception=None): try: Session.remove() except: pass
def remove_session(ex=None): from app.models.base import Session Session.remove()