simple py code for hitting api