rewritten as a Flask-Script extension