Flask-MySQL allows you to access MySQL directly from your flask application.
To install it :
pip install flask-pyMySQL
To commit to pip
python3 -m pip install setuptools wheel
python3 setup.py sdist bdist_wheel
python3 -m pip install twine
twine upload dist/*
refer: https://zhuanlan.zhihu.com/p/37987613