import socket


def ipv4(value):
    """Return true if IP address v4 is valid, otherwise - false."""

    try:
        socket.inet_pton(socket.AF_INET, value)
        return True
    except socket.error:
        return False