python lint fixes
fix termination
upgrade sqlalchemy version
small optomization
fix return type for app delegate exit