>>> gi = pygeoip.GeoIP('GeoIP.dat') >>> gi.country_code_by_name('google.com') 'US' >>> gi.country_code_by_addr('64.233.161.99') 'US' >>> gi.country_name_by_addr('64.233.161.99') 'United States'