Consuming the API in Python