@contextlib.contextmanager
def open(self, key: str) -> Iterator[BinaryIO]:
    'Open a file handle to an object stored under the given key.\n\n        .. note:: this should only be used to open a handle to read an existing file. To write a new file use the method\n            ``put_object_from_filelike`` instead.\n\n        :param key: fully qualified identifier for the object within the repository.\n        :return: yield a byte stream object.\n        :raise FileNotFoundError: if the file does not exist.\n        :raise OSError: if the file could not be opened.\n        '
    if (not self.has_object(key)):
        raise FileNotFoundError(f'object with key `{key}` does not exist.')
Open a file handle to an object stored under the given key.

.. note:: this should only be used to open a handle to read an existing file. To write a new file use the method
    ``put_object_from_filelike`` instead.

:param key: fully qualified identifier for the object within the repository.
:return: yield a byte stream object.
:raise FileNotFoundError: if the file does not exist.
:raise OSError: if the file could not be opened.
@contextlib.contextmanager
def open(self, key: str) -> Iterator[BinaryIO]:
    'Open a file handle to an object stored under the given key.\n\n        .. note:: this should only be used to open a handle to read an existing file. To write a new file use the method\n            ``put_object_from_filelike`` instead.\n\n        :param key: fully qualified identifier for the object within the repository.\n        :return: yield a byte stream object.\n        :raise FileNotFoundError: if the file does not exist.\n        :raise OSError: if the file could not be opened.\n        '
    if (not self.has_object(key)):
        raise FileNotFoundError(f'object with key `{key}` does not exist.')