ImportError: No module named flaskext.sqlalchemy

That snippet is really old. flaskext is no more (or at least very deprecated). Refer to packages directly rather than through flaskext or flask.ext. from flask_sqlalchemy import SQLAlchemy Flask-SQLAlchemy (and most other extensions) no longer register in the flaskext namespace, and flask.ext was deprecated then removed in 1.0. The only correct way to refer to … Read more

How to stop flask application without using ctrl-c

If you are just running the server on your desktop, you can expose an endpoint to kill the server (read more at Shutdown The Simple Server): from flask import request def shutdown_server(): func = request.environ.get(‘werkzeug.server.shutdown’) if func is None: raise RuntimeError(‘Not running with the Werkzeug Server’) func() @app.get(‘/shutdown’) def shutdown(): shutdown_server() return ‘Server shutting down…’ … Read more