flask-sqlalchemy inserting a dictionary to a database

  1. Define a model class that represents the table in the database.

  2. Create an instance of the model class and populate it with data from the dictionary.

  3. Add the instance to the session.

  4. Commit the session to persist the changes to the database.