import socket
import struct


def ip4_from_int(ip):
    """Convert :py:class:`int` to IPv4 string

    :param ip: int representing an IPv4
    :type ip: int
    :return: IP in dot-decimal notation
    :rtype: str
    """
    return socket.inet_ntoa(struct.pack(">L", ip))