PyFunceble/__init__.py
def is_ipv4_range(ip):  # pragma: no cover
    """
    Check if the given IP is an IP range.

    :param ip: The IP we are checking.
    :type ip: str

    :return: The IPv4 range state.
    :rtype: bool

    .. warning::
        If an empty or a non-string :code:`ip` is given, we return :code:`None`.
    """

    if ip and isinstance(ip, str):
        # The given IP is not empty nor None.
        # and
        # * The given IP is a string.

        # We silently load the configuration.
        load_config(True)

        return Check(ip).is_ip_range()

    # We return None, there is nothing to check.
    return None
def is_ipv4_range(ip):  # pragma: no cover
    """
    Check if the given IP is an IP range.

    :param ip: The IP we are checking.
    :type ip: str

    :return: The IPv4 range state.
    :rtype: bool

    .. warning::
        If an empty or a non-string :code:`ip` is given, we return :code:`None`.
    """

    if ip and isinstance(ip, str):
        # The given IP is not empty nor None.
        # and
        # * The given IP is a string.

        # We silently load the configuration.
        load_config(True)

        return Check(ip).is_ip_range()

    # We return None, there is nothing to check.
    return None
def is_ipv4_range ( ip ) : # pragma: no cover if ip and isinstance ( ip , str ) : # The given IP is not empty nor None. # and # * The given IP is a string. # We silently load the configuration. load_config ( True ) return Check ( ip ) . is_ip_range ( ) # We return None, there is nothing to check. return None
Check if the given IP is an IP range.

    :param ip: The IP we are checking.
    :type ip: str

    :return: The IPv4 range state.
    :rtype: bool

    .. warning::
        If an empty or a non-string :code:`ip` is given, we return :code:`None`.
Check if the given IP is an IP range .