sqlalchemy check if table is empty code example Example: sqlalchemy empty table db.session.query(model_name).delete() db.session.commit()