def get_data(self, path): """Return the data from path as raw bytes.""" with io.FileIO(path, 'r') as file: return file.read() # inspired from importlib2