API example based on Flask