Rebuild of unfriended (php) app using Flask framework