def bool_from_env_string(string: str) -> bool:
    """Convert a string recieved from an environment variable into a
    bool.

    'true', 'TRUE', 'TrUe', 1, '1' =  True

    Everything else is False.

    :param string:  The string to convert to a bool.

    """
    if str(string).lower() == 'false' or str(string) == '':
        return False
    if str(string).lower() == 'true':
        return True
    try:
        int_value = int(string)
        if int_value == 1:
            return True
        else:
            return False
    except:
        return False