def get_object_hash(self, key: str) -> str:
    'Return the SHA-256 hash of an object stored under the given key.\n\n        .. important::\n            A SHA-256 hash should always be returned,\n            to ensure consistency across different repository implementations.\n\n        :param key: fully qualified identifier for the object within the repository.\n        :raise FileNotFoundError: if the file does not exist.\n        :raise OSError: if the file could not be opened.\n        '
    with self.open(key) as handle:
        return chunked_file_hash(handle, hashlib.sha256)
Return the SHA-256 hash of an object stored under the given key.

.. important::
    A SHA-256 hash should always be returned,
    to ensure consistency across different repository implementations.

:param key: fully qualified identifier for the object within the repository.
:raise FileNotFoundError: if the file does not exist.
:raise OSError: if the file could not be opened.
def get_object_hash(self, key: str) -> str:
    'Return the SHA-256 hash of an object stored under the given key.\n\n        .. important::\n            A SHA-256 hash should always be returned,\n            to ensure consistency across different repository implementations.\n\n        :param key: fully qualified identifier for the object within the repository.\n        :raise FileNotFoundError: if the file does not exist.\n        :raise OSError: if the file could not be opened.\n        '
    with self.open(key) as handle:
        return chunked_file_hash(handle, hashlib.sha256)