sh_cpl/src/sh_edraft/configuration/base/configuration_base.py

21 lines
543 B
Python
Raw Normal View History

from abc import abstractmethod, ABC
2020-11-25 21:41:45 +01:00
from collections import Callable
from typing import Type
2020-11-25 21:41:45 +01:00
2020-11-26 10:45:02 +01:00
from sh_edraft.configuration.base.configuration_model_base import ConfigurationModelBase
2020-11-25 21:41:45 +01:00
class ConfigurationBase(ABC):
2020-11-25 21:41:45 +01:00
@abstractmethod
def __init__(self): pass
2020-11-25 21:41:45 +01:00
@abstractmethod
def add_config_by_type(self, key_type: type, value: object): pass
@abstractmethod
def get_config_by_type(self, search_type: Type[ConfigurationModelBase]) -> Callable[ConfigurationModelBase]: pass
@abstractmethod
def create(self): pass