from ip2geotools.databases.noncommercial import DbIpCity def get_info(ip: str): response = DbIpCity.get(ip, api_key='free') return response.__dict__