A thread-local object is an object that is stored in a dedicated structure, attached to the current thread id. Flask utilizes thread local objects internally so that user don’t have to pass objects around from function to function within a request to stay threadsafe. Thread local storage performs within the current thread. This approach is helpful, but it needs a valid request context for dependency injection or when attempting to reuse code which utilizes a value pegged to the request.