Configuration variables

To connect a SQLite database to Flask, and SQLAlchemy, we only need set a few configuration variables in the Flask app. I usually define my configuration variables in a separate file, I then import this file into I have noticed that I need a secret key defined to use some features of SQLAlchemy. Best practice is to set this to a secure value.

class Config:
    SQLALCHEMY_DATABASE_URI = 'sqlite:///{}'.format(db_path)

def init_app():
    app = Flask(__name__, instance_relative_config=False)
    app.secret_key = 'abc'