Source code for h1st.model_repository.storage.base

from typing import Union, Any, NoReturn
from abc import ABC, abstractmethod


[docs]class Storage(ABC): """ Base class for storage """
[docs] @abstractmethod def get_obj(self, name: str) -> Any: ...
[docs] @abstractmethod def set_obj(self, name: str, value: Any) -> NoReturn: ...
[docs] @abstractmethod def get_bytes(self, name: str) -> bytes: ...
[docs] @abstractmethod def set_bytes(self, name: str, value: bytes) -> NoReturn: ...
[docs] @abstractmethod def exists(self, name: str) -> bool: ...
[docs] @abstractmethod def delete(self, name: str) -> Any: ...