Storage

dotflow.abc.storage.Storage

Bases: ABC

Storage

Source code in dotflow/abc/storage.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class Storage(ABC):
    """Storage"""

    def __init__(self, *args, **kwargs):
        pass

    @abstractmethod
    def post(self, key: str, context: Context) -> None:
        """Post context somewhere"""

    @abstractmethod
    def get(self, key: str) -> Context:
        """Get context somewhere"""

    @abstractmethod
    def key(self, task: Callable):
        """Function that returns a key to get and post storage"""

__init__(*args, **kwargs)

Source code in dotflow/abc/storage.py
12
13
def __init__(self, *args, **kwargs):
    pass

get(key) abstractmethod

Get context somewhere

Source code in dotflow/abc/storage.py
19
20
21
@abstractmethod
def get(self, key: str) -> Context:
    """Get context somewhere"""

key(task) abstractmethod

Function that returns a key to get and post storage

Source code in dotflow/abc/storage.py
23
24
25
@abstractmethod
def key(self, task: Callable):
    """Function that returns a key to get and post storage"""

post(key, context) abstractmethod

Post context somewhere

Source code in dotflow/abc/storage.py
15
16
17
@abstractmethod
def post(self, key: str, context: Context) -> None:
    """Post context somewhere"""