original_docstring: Returns a dict containing an IP geolocation lookup from the freegeoip.net api. Optionally takes an IP address or hostname to lookup as argument, otherwise looks up the client's IP.
docstring: Returns a dict containing an IP geolocation lookup from the freegeoip.net api. Optionally takes an IP address or hostname to lookup as argument, otherwise looks up the client's IP.
docstring_tokens: Returns a dict containing an IP geolocation lookup from the freegeoip . net api . Optionally takes an IP address or hostname to lookup as argument otherwise looks up the client ' s IP .
code: def lookup(self, ip=""):
          "Returns a dict containing an IP geolocation lookup from the freegeoip.net api. Optionally takes an IP address or hostname to lookup as argument, otherwise looks up the client's IP."
          r = requests.get("http://freegeoip.net/json/" + ip)
          if r.status_code != 200: return {"http_status_code": r.status_code}
          return json.loads(r.text)
code_tokens: def lookup ( self , ip = "" ) : r = requests . get ( "http://freegeoip.net/json/" + ip ) if r . status_code != 200 : return { "http_status_code" : r . status_code } return json . loads ( r . text )
short_docstring: Returns a dict containing an IP geolocation lookup from the freegeoip.net api.
short_docstring_tokens: Returns a dict containing an IP geolocation lookup from the freegeoip . net api .
comment: "Returns a dict containing an IP geolocation lookup from the freegeoip.net api. Optionally takes an IP address or hostname to lookup as argument, otherwise looks up the client's IP."