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 suceeds, etc.).

Note

Notifications require some setup and configuration on the Flyte platform side. Please contact your Flyte platform admins to get this feature enabled. See How do I use and enable notifications on Flyte?

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 flytekit.core.notification.Notification(phases: List[int], email: Optional[flytekit.models.common.EmailNotification] = None, pager_duty: Optional[flytekit.models.common.PagerDutyNotification] = None, slack: Optional[flytekit.models.common.SlackNotification] = None)[source]

Classes

Email(phases, recipients_email)

This notification should be used when sending regular emails to people.

Notification(phases, email, pager_duty, slack)

PagerDuty(phases, recipients_email)

This notification should be used when sending emails to the PagerDuty service.

Slack(phases, recipients_email)

This notification should be used when sending emails to the Slack.