EOX GitLab Instance

Skip to content
Snippets Groups Projects
abc.py 517 B
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from pystac import Item

from ..source import Source


class Backend(ABC):
    def __repr__(self) -> str:
        return f"<{self.__class__.__name__}>"

    @abstractmethod
    def register(self, source: Source, item: "Item", replace: bool):
        ...

    # @abstractmethod
    # def deregister(self, item: "Item") -> str:
    #     ...

    @abstractmethod
    def exists(self, source: Source, item: "Item"):
        ...