Skip to content

Notifier

Notifier

Bases: ABC

The interface for a notifier

This is expected to be implemented concretely by the each UX

Source code in src/goose/notifier.py
class Notifier(ABC):
    """The interface for a notifier

    This is expected to be implemented concretely by the each UX
    """

    @abstractmethod
    def log(self, content: RenderableType) -> None:
        """Append content to the main display

        Args:
            content (str): The content to render
        """
        pass

    @abstractmethod
    def status(self, status: Optional[str]) -> None:
        """Log a status to ephemeral display

        Args:
            status (str): The status to display
        """
        pass

    @abstractmethod
    def start(self) -> None:
        """Start the display for the notifier"""
        pass

    @abstractmethod
    def stop(self) -> None:
        """Stop the display for the notifier"""
        pass

log(content) abstractmethod

Append content to the main display

Parameters:

Name Type Description Default
content str

The content to render

required
Source code in src/goose/notifier.py
@abstractmethod
def log(self, content: RenderableType) -> None:
    """Append content to the main display

    Args:
        content (str): The content to render
    """
    pass

start() abstractmethod

Start the display for the notifier

Source code in src/goose/notifier.py
@abstractmethod
def start(self) -> None:
    """Start the display for the notifier"""
    pass

status(status) abstractmethod

Log a status to ephemeral display

Parameters:

Name Type Description Default
status str

The status to display

required
Source code in src/goose/notifier.py
@abstractmethod
def status(self, status: Optional[str]) -> None:
    """Log a status to ephemeral display

    Args:
        status (str): The status to display
    """
    pass

stop() abstractmethod

Stop the display for the notifier

Source code in src/goose/notifier.py
@abstractmethod
def stop(self) -> None:
    """Stop the display for the notifier"""
    pass