"""Definition of ObjectRepositoryInterface abstract base class.""" from abc import ABC, abstractmethod from io import BytesIO class ObjectRepositoryInterface(ABC): """Interface that defines binary object CRUD methods.""" @abstractmethod def get(self, object_name: str) -> BytesIO | None: """Get an object by name.""" ... @abstractmethod def put( self, object_name: str, data: BytesIO, content_type: str = "application/octet-stream", ) -> None: """Put an object by name.""" ... @abstractmethod def delete(self, object_name: str) -> None: """Delete an object by name.""" ... @abstractmethod def list_objects(self, prefix: str = "") -> list[str]: """List object names with an optional prefix.""" ...