The page you navigated to does not exist, so we brought you to the closest page to it.
flytekit.core.notification
flytekit.core.notification Notifications are primarily used when defining Launch Plans (also can be used when launching executions) and will trigger
the Flyte platform to send emails when a workflow run reaches certain stages (fails or succeeds, etc.).
Each notification type takes a list of flytekit.models.core.execution.WorkflowExecutionPhase and a list of
emails. Even though there are different notification classes in this module, they all just send email. The differentiation
offers semantic meaning to the end-user but do not functionally behave differently. Successful integration with Slack
and Pagerduty is incumbent on those email API being set-up correctly.
Class
Description
Email
This notification should be used when sending regular emails to people.
Notification
PagerDuty
This notification should be used when sending emails to the PagerDuty service.
Slack
This notification should be used when sending emails to the Slack.
This notification should be used when sending regular emails to people.
from flytekit.models.core.execution import WorkflowExecutionPhase
Email ( phases = [ WorkflowExecutionPhase . SUCCEEDED ], recipients_email = [ "[email protected] " ])
class Email (
phases : typing . List [ int ],
recipients_email : typing . List [ str ],
)
Parameter
Type
Description
phases
typing.List[int]
recipients_email
typing.List[str]
Property
Type
Description
email
None
:rtype: EmailNotification
is_empty
None
pager_duty
None
:rtype: PagerDutyNotification
phases
None
A list of phases to which users can associate the notifications. :rtype: list[int]
slack
None
:rtype: SlackNotification
Parameter
Type
Description
p
def serialize_to_string ()
:rtype: Text
:rtype: flyteidl.admin.common_pb2.Notification
class Notification (
phases : typing . List [ int ],
email : flytekit . models . common . EmailNotification ,
pager_duty : flytekit . models . common . PagerDutyNotification ,
slack : flytekit . models . common . SlackNotification ,
)
Parameter
Type
Description
phases
typing.List[int]
email
flytekit.models.common.EmailNotification
pager_duty
flytekit.models.common.PagerDutyNotification
slack
flytekit.models.common.SlackNotification
Property
Type
Description
email
None
:rtype: EmailNotification
is_empty
None
pager_duty
None
:rtype: PagerDutyNotification
phases
None
A list of phases to which users can associate the notifications. :rtype: list[int]
slack
None
:rtype: SlackNotification
Parameter
Type
Description
p
def serialize_to_string ()
:rtype: Text
:rtype: flyteidl.admin.common_pb2.Notification
This notification should be used when sending emails to the PagerDuty service.
from flytekit.models.core.execution import WorkflowExecutionPhase
PagerDuty ( phases = [ WorkflowExecutionPhase . SUCCEEDED ], recipients_email = [ "[email protected] " ])
class PagerDuty (
phases : typing . List [ int ],
recipients_email : typing . List [ str ],
)
Parameter
Type
Description
phases
typing.List[int]
recipients_email
typing.List[str]
Property
Type
Description
email
None
:rtype: EmailNotification
is_empty
None
pager_duty
None
:rtype: PagerDutyNotification
phases
None
A list of phases to which users can associate the notifications. :rtype: list[int]
slack
None
:rtype: SlackNotification
Parameter
Type
Description
p
def serialize_to_string ()
:rtype: Text
:rtype: flyteidl.admin.common_pb2.Notification
This notification should be used when sending emails to the Slack.
from flytekit.models.core.execution import WorkflowExecutionPhase
Slack ( phases = [ WorkflowExecutionPhase . SUCCEEDED ], recipients_email = [ "[email protected] " ])
class Slack (
phases : typing . List [ int ],
recipients_email : typing . List [ str ],
)
Parameter
Type
Description
phases
typing.List[int]
recipients_email
typing.List[str]
Property
Type
Description
email
None
:rtype: EmailNotification
is_empty
None
pager_duty
None
:rtype: PagerDutyNotification
phases
None
A list of phases to which users can associate the notifications. :rtype: list[int]
slack
None
:rtype: SlackNotification
Parameter
Type
Description
p
def serialize_to_string ()
:rtype: Text
:rtype: flyteidl.admin.common_pb2.Notification