Black Lives Matter. Please consider donating to Black Girls Code today.

App loading twice

Every application seems to load twice. I can use any of the examples published on, and when I insert a simple print

if __name__ == '__main__':
    print('starting main')

the console reports
Is there any particular reason in doing so?

That’s just part of the flask debugger process (part of debug=True). When you deploy your app with e.g. gunicorn, it won’t run twice.