maestral.notify

This module handles desktop notifications and supports multiple backends, depending on the platform.

Module Contents

maestral.notify.NONE = 100[source]
maestral.notify.ERROR = 40[source]
maestral.notify.SYNCISSUE = 30[source]
maestral.notify.FILECHANGE = 15[source]
maestral.notify.level_number_to_name(number: int)str[source]

Converts a Maestral notification level number to name.

maestral.notify.level_name_to_number(name: str)int[source]

Converts a Maestral notification level name to number.

class maestral.notify.MaestralDesktopNotifier(config_name: str)[source]

Desktop notification emitter for Maestral

Desktop notifier with snooze functionality and variable notification levels.

property notify_level(self)int[source]

Custom notification level. Notifications with a lower level will be discarded.

property snoozed(self)float[source]

Time in minutes to snooze notifications. Applied to FILECHANGE level only.

notify(self, title: str, message: str, level: int = FILECHANGE, on_click: Optional[Callable] = None, actions: Optional[Dict[str, Callable]] = None)None[source]

Sends a desktop notification.

Parameters
  • title – Notification title.

  • message – Notification message.

  • level – Notification level of the message.

  • on_click – A callback to execute when the notification is clicked. The provided callable must not take any arguments.

  • actions – A dictionary with button names and callbacks for the notification.