'Returns a dictionary of city information for the given IP address or
Fully Qualified Domain Name (FQDN).  Some information in the dictionary
may be undefined (None).'

def city(self, query):

    self._check_query(query, city=True)
    if ipregex.match(query):
        ptr = rec_by_addr(self._city, c_char_p(query))
    else:
        ptr = rec_by_name(self._city, c_char_p(query))
    if bool(ptr):
        record = ptr.contents
        return dict(((tup[0], getattr(record, tup[0])) for tup in record._fields_))
    else:
        return None
