flask callback