Using flask to create a restful application