Files
visual-semiotic-ai-analysis/data_store/interfaces/image_repository_interface.py
T
Brian Bjarke Jensen 0ba860b892
Code Quality Pipeline / code-quality (pull_request) Failing after 1m19s
Test Python Package / test (pull_request) Failing after 50s
added infrastructure code
2025-09-18 12:13:39 +02:00

30 lines
811 B
Python

"""Definition of ImageRepositoryInterface"""
from uuid import UUID
from abc import ABC, abstractmethod
from PIL import Image
class ImageRepositoryInterface(ABC):
"""ImageRepository interface."""
@abstractmethod
def get(self, image_id: UUID) -> Image.Image | None:
"""Retrieve an Image by its ID."""
raise NotImplementedError()
@abstractmethod
def put(self, image: Image.Image, image_id: UUID) -> None:
"""Update or create an Image."""
raise NotImplementedError()
@abstractmethod
def delete(self, image_id: UUID) -> None:
"""Delete an Image by its ID."""
raise NotImplementedError()
@abstractmethod
def list_all(self) -> list[UUID]:
"""List all image IDs in the repository."""
raise NotImplementedError()