Application and request contexts in Flask

I really need your help. I am currently doing a project with Flask and I have used the application and request contexts but to this day I have not been able to understand why it is necessary to use them? I don't understand how they work. Every time a request is made to a web app developed with Flask a new instance of the Flask class is created or really how a Flask app works under the hood. It would be very helpful if you help me solve this doubt that is driving me crazy. Thank you very much in advance.

I've read everywhere and I still don't understand.

Back to Top