Dev Setup

  • Install Virtualenv
sudo pip3 install virtualenv
  • Create virtualenv folder
python3 -m venv env

Activate Virtualenv

source env/bin/activate

Install requirements

pip3 install -r requirements.txt

Deactivate Virtualenv

deactivate

Run Server

python server.py

Populate DB

python populate_data.py

Seeing all Data

flask shell
from models.models import Student
Student.query.all()
Student.query.filter_by(name='Akshat').all()
Student.query.get(3)