flask + sqlalchemy based on flask-sqlalchemy minus legacy for older versions of flask & sqlalchemy