I have an app factory like so
db = SQLAlchemy()
def create_app(environment):
app = Flask(__name__)
app.config.from_object(config[environment])
db.init_app(app)
# ... etc
return app
then, I have a script which fetches CSVs outside of the context of the application. This script is a cron which is run every x hours
I want to update the sqlite database somehow that the application is using. Is this possible?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…