You can use redirect() method to redirect a url in Python Flask. Here is an example code
import os ...