prefect.blocks.notifications
Classes
AbstractAppriseNotificationBlock
An abstract class for sending notifications using Apprise.
Methods:
block_initialization
logger
- The run logger or a default logger with the class’s name.
notify
notify
body
: The body of the notification.subject
: The subject of the notification.
raise_on_failure
AppriseNotificationBlock
A base class for sending notifications using Apprise, through webhook URLs.
Methods:
block_initialization
notify
notify
SlackWebhook
Enables sending notifications via a provided Slack webhook.
Examples:
Load a saved Slack webhook and send a message:
notify
MicrosoftTeamsWebhook
Enables sending notifications via a provided Microsoft Teams webhook.
Examples:
Load a saved Teams webhook and send a message:
block_initialization
notify
PagerDutyWebHook
Enables sending notifications via a provided PagerDuty webhook.
See Apprise notify_pagerduty docs
for more info on formatting the URL.
Examples:
Load a saved PagerDuty webhook and send a message:
block_initialization
block_initialization
notify
notify
TwilioSMS
Enables sending notifications via Twilio SMS.
Find more on sending Twilio SMS messages in the docs.
Examples:
Load a saved TwilioSMS
block and send a message:
block_initialization
block_initialization
notify
OpsgenieWebhook
Enables sending notifications via a provided Opsgenie webhook.
See Apprise notify_opsgenie docs
for more info on formatting the URL.
Examples:
Load a saved Opsgenie webhook and send a message:
block_initialization
block_initialization
notify
MattermostWebhook
Enables sending notifications via a provided Mattermost webhook.
See Apprise notify_Mattermost docs # noqa
Examples:
Load a saved Mattermost webhook and send a message:
block_initialization
block_initialization
notify
DiscordWebhook
Enables sending notifications via a provided Discord webhook.
See Apprise notify_Discord docs # noqa
Examples:
Load a saved Discord webhook and send a message:
block_initialization
block_initialization
notify
CustomWebhookNotificationBlock
Enables sending notifications via any custom webhook.
All nested string param contains {{key}}
will be substituted with value from context/secrets.
Context values include: subject
, body
and name
.
Examples:
Load a saved custom webhook and send a message:
block_initialization
logger
- The run logger or a default logger with the class’s name.
notify
notify
body
: The body of the notification.subject
: The subject of the notification.