def get_ip_info(): ip = request.remote_addr info = get_info(ip) info['ip'] = ip return json.dumps(info)
def get_specified_ip_info(ip): info = get_info(ip) info['ip'] = ip return json.dumps(info)