Everyone should be using the built in python argparser. This is a good example: https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/list_datastore_info.py
Flask + SQLAlchemy instead of FlaskSQLAlchemy
https://towardsdatascience.com/use-flask-and-sqlalchemy-not-flask-sqlalchemy-5a64fafe22a4
Testing python scripts
You have a python script that has some unit tests that you want to run:
python -c "m = __import__("my-script"); m.unittest()"
Runs the unittest() function within your script. N.B. this still works if your script has a hypen in the name which is my style.