testing api with python