desktop_notifier.sync¶
Synchronous desktop notification API
Classes¶
A synchronous counterpart to |
Module Contents¶
- class desktop_notifier.sync.DesktopNotifierSync(app_name='Python', app_icon=DEFAULT_ICON, notification_limit=None)¶
A synchronous counterpart to
desktop_notifier.main.DesktopNotifier
Warning
Callbacks on interaction with the notification will not work on macOS or Linux without a running event loop.
- Parameters:
app_name (str)
app_icon (desktop_notifier.common.Icon | None)
notification_limit (int | None)
- property app_icon: desktop_notifier.common.Icon | None¶
The application icon
- Return type:
desktop_notifier.common.Icon | None
- request_authorisation()¶
See
desktop_notifier.main.DesktopNotifier.request_authorisation()
- Return type:
- has_authorisation()¶
See
desktop_notifier.main.DesktopNotifier.has_authorisation()
- Return type:
- send_notification(notification)¶
See
desktop_notifier.main.DesktopNotifier.send_notification()
- Parameters:
notification (desktop_notifier.common.Notification)
- Return type:
- send(title, message, urgency=Urgency.Normal, icon=None, buttons=(), reply_field=None, on_dispatched=None, on_clicked=None, on_dismissed=None, attachment=None, sound=None, thread=None, timeout=-1)¶
See
desktop_notifier.main.DesktopNotifier.send()
- Parameters:
title (str)
message (str)
urgency (desktop_notifier.common.Urgency)
icon (desktop_notifier.common.Icon | None)
buttons (Sequence[desktop_notifier.common.Button])
reply_field (desktop_notifier.common.ReplyField | None)
on_dispatched (Callable[[], Any] | None)
on_clicked (Callable[[], Any] | None)
on_dismissed (Callable[[], Any] | None)
attachment (desktop_notifier.common.Attachment | None)
sound (desktop_notifier.common.Sound | None)
thread (str | None)
timeout (int)
- Return type:
- get_current_notifications()¶
See
desktop_notifier.main.DesktopNotifier.get_current_notifications()
- clear(identifier)¶
See
desktop_notifier.main.DesktopNotifier.clear()
- Parameters:
identifier (str)
- Return type:
None
- clear_all()¶
See
desktop_notifier.main.DesktopNotifier.clear_all()
- Return type:
None
- get_capabilities()¶
See
desktop_notifier.main.DesktopNotifier.get_capabilities()
- Return type: