How to automaticaly insert a row in flask-sqlalchemy while creating the database in flask

Solution
@app.before_first_request
def populate_db():
    student = students(
        name = 'Rishkan', 
        city = 'New York',
        addr = 'test street 10',
        pin = '1234')
    
    db.session.add(student)
    db.session.commit()