Handle db.schema.session through Flask