title: What API, package or library is easiest to find the location of an IP address?
body: <p>this is my scenario. I want to be able to write a script in python that when entered an IP address, it looks that ip address up on a API, and returns the result. Can anyone tell me a good working lookup API with the code. For example this is hostip:</p>
  
  <pre><code>import urllib
  
  response = urllib.urlopen('http://api.hostip.info/get_html.php?ip=12.215.42.19&amp;position=true').read()
  
  print(response)
  </code></pre>
  
  <p>However hostIP has a very small database, and cannot return many locations.</p>