I have a flask app that I've been building using the application factory pattern: Application structure
Until now I've been developing using a sqlite3 database, and some simple models placed in app/models.py with the idea of setting up a mysql database for production.
However, I see the need for other (non flask) apps to communicate with this database. I would therefore like to make my database creation code and models into a seperate python package, and use that as a dependency in my flask application.
My question is what is best practice in this case? Can I define models needed by my flask app using flask-sqlalchemy models, and "pure" sqlalchemy models for the other packages? Is there a better way to make setting up the database not depend on models I write for the flask app?