added api using Flask microframework