def int_to_ip(ip, ip_type):
    if ip_type == '6':
        IPKlass = ipaddr.IPv6Address
    elif ip_type == '4':
        IPKlass = ipaddr.IPv4Address
    return str(IPKlass(ip))
A wrapper that converts a 32 or 128 bit integer into human readable IP
dataset/ETHPy150Open rtucker-mozilla/mozilla_inventory/core/utils.py/int_to_ip