Skip to content

Discord

Discord integration for alerter components.

DiscordIntegration

Bases: Integration

Definition of a Discord integration for ZenML.

Implemented using Discord API Wrapper.

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

    Implemented using [Discord API Wrapper](https://pypi.org/project/discord.py/).
    """

    NAME = DISCORD
    REQUIREMENTS = ["discord.py>=2.3.2", "aiohttp>=3.8.1", "asyncio"]
    REQUIREMENTS_IGNORED_ON_UNINSTALL = ["aiohttp","asyncio"]

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

        Returns:
            List of new flavors defined by the Discord integration.
        """
        from zenml.integrations.discord.flavors import DiscordAlerterFlavor

        return [DiscordAlerterFlavor]

flavors() classmethod

Declare the stack component flavors for the Discord integration.

Returns:

Type Description
List[Type[Flavor]]

List of new flavors defined by the Discord integration.

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

    Returns:
        List of new flavors defined by the Discord integration.
    """
    from zenml.integrations.discord.flavors import DiscordAlerterFlavor

    return [DiscordAlerterFlavor]