Convert to flask-script