import pkg_resources


def get_data(filename):
    """Gets a data file from the package.

    Args:
        filename: The name of the data file as located in the package data
          directory.

    Returns:
        A readable file-like object for the data file.
    """

    path = "data/" + filename
    return pkg_resources.resource_stream(__name__, path)