apis in python working