Code snippets for making basic API calls in Python