def isolate_path_filename(uri):
    """Accept a url and return the isolated filename component

    Accept a uri in the following format - http://site/folder/filename.ext and return the filename component.

    Args:
        uri (:py:class:`str`): The uri from which the filename should be returned
    Returns:
        file_component (:py:class:`str`): The isolated filename
    """
    # Look for the last slash
    url_parse = uri.rpartition('/')

    # Take everything to the right of the last slash and seperate it on the '.' if it exists, otherwise return the
    # string as is
    if '.' in url_parse[2]:
        file_parse = url_parse[2].rpartition('.')
        file_component = file_parse[0]
    else:
        file_component = url_parse[2]

    return file_component