Using module-scope variables or global variable aren't thread-safe.
But what's about other like Blueprint?
I see in their document and many other code on git declares an instance of Blueprint as a module variable
http://flask.pocoo.org/docs/1.0/blueprints/
Exposing blueprint instance which can be changed in any request isnt wise choice. Why they dont declare it in some singleton or immutable object to prevent race condition?
I've read this answer. Working with a global singleton in Flask (WSGI), do I have to worry about race conditions?
Do i have to lock Blueprint instance in this case?