Our scheduler application needs data, and we want to store that data properly so that we can stop and start our application without losing our appointments.
We are working from the
models.py file inside the
sched directory of our project.
SQLAlchemy provides a Python toolkit and object-relational manager for relational databases which use SQL. SQLAlchemy stands on its own, regardless of what web framework you use, and we can integrate it into Flask with Flask-SQLAlchemy, which will manage database connections with the Flask request lifecycle.
Flask Flask-Script Flask-SQLAlchemy
$ pip install -r requirements.txt
Let's model our appointment data structure using SQLAlchemy's ...