import flask_sqlalchemy db = flask_sqlalchemy.SQLAlchemy(session_options=dict(autoflush=False)) class Medium(db.Model): __tablename__ = 'media' id = db.Column(db.Integer, primary_key=True) typename = db.Column(db.String) caption = db.Column(db.String) shortcode = db.Column(db.String) taken_at = db.Column(db.DateTime) width = db.Column(db.Integer) height = db.Column(db.Integer) display_url = db.Column(db.String) thumbnail_url = db.Column(db.String) likes = db.Column(db.Integer) owner_id = db.Column(db.Integer) owner_username = db.Column(db.String) owner_profile_pic_url = db.Column(db.String)