""" Database Module """

from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()

""" Database Module """

from flask_sqlalchemy import SQLAlchemy
from penelophant import app
db = SQLAlchemy(app)

Attach app to SQLAlchemy properly