import socket
import struct


def int2ip(number):
    """
    Converts the given integer value to an IP address.

    :type  number: long
    :param number: An IP as a number.
    :rtype:  string
    :return: The IP address.
    """
    number &= 0xFFFFFFFF
    return socket.inet_ntoa(struct.pack('!L', number))