notifications
- eztaskmanager.services.notifications.get_base_url()[source]
Retrieve the base URL for the current site.
- Returns:
The base URL for the current site.
- Return type:
str
- Raises:
None. –
Examples
>>> get_base_url() 'example.com'
- class eztaskmanager.services.notifications.NotificationHandler(level: int | str = 0)[source]
An abstract base class for handling notifications.
- class eztaskmanager.services.notifications.SlackNotificationHandler(token, channel, level)[source]
This class is a notification handler that sends notifications to a specified Slack channel using the Slack API.
- Params:
client (slack_sdk.WebClient): The Slack WebClient object used to interact with the Slack API. channel (str): The Slack channel to which the notifications will be sent. level (int): The log level at which notifications will be sent.
- class eztaskmanager.services.notifications.EmailNotificationHandler(from_email, recipients, level)[source]
A class for handling email notifications.
Inherits from NotificationHandler.
- from_email
The email address to use as the sender of the notification.
- Type:
str
- recipients
A list of email addresses to send the notification to.
- Type:
list[str]
- level
The level of the notification.
- Type:
int