Some sqlalchemy stuffs for understanding.