desktop_notifier.sync

Synchronous desktop notification API

Classes

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:
property app_name: str

The application name

Return type:

str

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:

bool

has_authorisation()

See desktop_notifier.main.DesktopNotifier.has_authorisation()

Return type:

bool

send_notification(notification)

See desktop_notifier.main.DesktopNotifier.send_notification()

Parameters:

notification (desktop_notifier.common.Notification)

Return type:

str

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:
Return type:

str

get_current_notifications()

See desktop_notifier.main.DesktopNotifier.get_current_notifications()

Return type:

list[str]

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:

frozenset[desktop_notifier.common.Capability]