desktop_notifier.dummy

Dummy backend for unsupported platforms.

Module Contents

Classes

DummyNotificationCenter

A dummy backend for unsupported platforms

class desktop_notifier.dummy.DummyNotificationCenter(app_name='Python', notification_limit=None)[source]

Bases: desktop_notifier.base.DesktopNotifierBase

A dummy backend for unsupported platforms

Parameters:
  • app_name (str)

  • notification_limit (int | None)

async request_authorisation()[source]

Request authorisation to send notifications.

Returns:

Whether authorisation has been granted.

Return type:

bool

async has_authorisation()[source]

Whether we have authorisation to send notifications.

Return type:

bool

async _send(notification, notification_to_replace)[source]

Method to send a notification via the platform. This should be implemented by subclasses.

Implementations must raise an exception when the notification could not be delivered. If the notification could be delivered but not fully as intended, e.g., because associated resources could not be loaded, implementations should emit a log message of level warning.

Parameters:
Returns:

The platform’s ID for the scheduled notification.

Return type:

str

async _clear(notification)[source]

Removes the given notification from the notification center. Should be implemented by subclasses.

Parameters:

notification (desktop_notifier.base.Notification) – Notification to clear.

Return type:

None

async _clear_all()[source]

Clears all notifications from the notification center. Should be implemented by subclasses.

Return type:

None