Skip to content

Instantly share code, notes, and snippets.

@ychennay
Created February 22, 2020 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ychennay/67da9401caec49ceb4a8b32315c81175 to your computer and use it in GitHub Desktop.
Save ychennay/67da9401caec49ceb4a8b32315c81175 to your computer and use it in GitHub Desktop.
Simple Flask Data Model for a Student
from flask.ext.sqlalchemy import SQLAlchemy
db = SQLAlchemy()
class Student(db.Model):
student_id = db.Column(db.Integer, primary_key=True)
first_name = db.Column(db.String(80))
last_name = db.Column(db.String(80))
enrolled_school = db.Column(db.String(30))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment