def is_iterable(value, allow_str=False):
    """Return if iterable."""
    try:
        if isinstance(value, str) and not allow_str:
            return False

        iter(value)
        return True
    except(ValueError, TypeError, Exception):
        return False