Flask is a web framework for python, meaning that it provides a simple interface for dynamically generating…