'app' is a variable defined in the __init__.py file (flask) (that's two underscores each end)
see: https://blog.miguelgrinberg.com/post/the...ello-world
search for 'app/__init__.py: Flask application instance'
see: https://blog.miguelgrinberg.com/post/the...ello-world
search for 'app/__init__.py: Flask application instance'