Geopal api code in python