Skip to content

Slack

Slack integration for alerter components.

SlackIntegration

Bases: Integration

Definition of a Slack integration for ZenML.

Implemented using Slack SDK.

Source code in src/zenml/integrations/slack/__init__.py
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
class SlackIntegration(Integration):
    """Definition of a Slack integration for ZenML.

    Implemented using [Slack SDK](https://pypi.org/project/slack-sdk/).
    """

    NAME = SLACK
    REQUIREMENTS = ["slack-sdk==3.30.0"]

    @classmethod
    def flavors(cls) -> List[Type[Flavor]]:
        """Declare the stack component flavors for the Slack integration.

        Returns:
            List of new flavors defined by the Slack integration.
        """
        from zenml.integrations.slack.flavors import SlackAlerterFlavor

        return [SlackAlerterFlavor]

flavors() classmethod

Declare the stack component flavors for the Slack integration.

Returns:

Type Description
List[Type[Flavor]]

List of new flavors defined by the Slack integration.

Source code in src/zenml/integrations/slack/__init__.py
35
36
37
38
39
40
41
42
43
44
@classmethod
def flavors(cls) -> List[Type[Flavor]]:
    """Declare the stack component flavors for the Slack integration.

    Returns:
        List of new flavors defined by the Slack integration.
    """
    from zenml.integrations.slack.flavors import SlackAlerterFlavor

    return [SlackAlerterFlavor]