How to make api requests in Python