import io


def slurp(path, encoding='UTF-8'):
    """
    Reads file `path` and returns the entire contents as a unicode string

    By default assumes the file is encoded as UTF-8

    Parameters
    ----------
    path : str
        File path to file on disk
    encoding : str, default `UTF-8`, optional
        Encoding of the file

    Returns
    -------

    The txt read from the file as a unicode string
    """
    with io.open(path, 'r', encoding=encoding) as f:
        return f.read()