Skip to content

Config

dotflow.core.config.Config

Import

You can import the Config class with:

from dotflow import Config

from dotflow.providers import (
    StorageDefault,
    NotifyDefault,
    LogDefault
)
Example

class dotflow.core.config.Config

config = Config(
    storage=StorageFile(path=".output"),
    notify=NotifyDefault(),
    log=LogDefault()
)

Parameters:

Name Type Description Default
storage Optional[Storage]

Type of the storage.

StorageDefault()
notify Optional[Notify]

Type of the notify.

NotifyDefault()
log Optional[Log]

Type of the notify.

LogDefault()

Attributes:

Name Type Description
storage Optional[Storage]
notify Optional[Notify]
log Optional[Log]
Source code in dotflow/core/config.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
class Config:
    """
    Import:
        You can import the **Config** class with:

            from dotflow import Config

            from dotflow.providers import (
                StorageDefault,
                NotifyDefault,
                LogDefault
            )

    Example:
        `class` dotflow.core.config.Config

            config = Config(
                storage=StorageFile(path=".output"),
                notify=NotifyDefault(),
                log=LogDefault()
            )

    Args:
        storage (Optional[Storage]): Type of the storage.
        notify (Optional[Notify]): Type of the notify.
        log (Optional[Log]): Type of the notify.

    Attributes:
        storage (Optional[Storage]):
        notify (Optional[Notify]):
        log (Optional[Log]):
    """

    def __init__(
        self,
        storage: Optional[Storage] = StorageDefault(),
        notify: Optional[Notify] = NotifyDefault(),
        log: Optional[Log] = LogDefault(),
    ) -> None:
        self.storage = storage
        self.notify = notify
        self.log = log