19 lines
456 B
Python
19 lines
456 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from typing import Self, Any, TypeVar
|
|
from abc import ABC, abstractmethod
|
|
|
|
T = TypeVar('T')
|
|
|
|
class ModelsManagerInterface(ABC):
|
|
|
|
@abstractmethod
|
|
def get(self:Self, Type:type[T], key:str) -> type[T]|None:pass
|
|
|
|
@abstractmethod
|
|
def add(self:Self,
|
|
Type:type[T],
|
|
inputs:dict[str, Any]|list[Any|None]|tuple[Any|None, ...]|str,
|
|
overwrite:bool = False
|
|
) -> None:pass |