Transitioning from sqlalchemy to postgres database : I've been using Flask with sqlalchemy but I've transitioned to setting up my own postgres databases and using psycopg2 to insert and return values from my databases.  I was wondering how the classes in my Model.py should change now that I'm no longer using the databases set up by sqlalchemy and whether I need to set up a db object at all anymore.

Setting up a db object:

    app = Flask(__name__)
    app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + os.path.join(basedir, 'data.sqlite')
    app.config['SQLALCHEMY_COMMIT_ON_TEARDOWN'] = True
    db.SQLALCHEMY(app) 

A sample of a class in my Model file:

    class User(UserMixin, db.Model):
        __tablename__ = 'users'
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(64), unique=True, index=True)
        username = db.Column(db.String(64), unique=True, index=True)
        role_id = db.Column(db.Integer, db.ForeignKey('roles.id'))
        zipAddress = db.Column(db.String(64))
