#!/usr/bin/env python
import dbus
import sys
# Use session bus
session_bus = dbus.SessionBus()
# Use notifications object
notifications_object = session_bus.get_object('org.freedesktop.Notifications', '/org/freedesktop/Notifications')
notifications_interface = dbus.Interface(notifications_object, 'org.freedesktop.Notifications')
# Sample empty notification
notification_id = notifications_interface.Notify(sys.argv[0], 0, '', 'Sample summary', 'Sample body', dbus.Array([], signature='s'), dbus.Array([], signature='(sv)'), -1)
# Sample notification with actions and hints
notification_id = notifications_interface.Notify(sys.argv[0], 0, '', 'Sample summary', 'Sample body', ['sample', 'Sample action'], {'x': 100, 'y': 100}, -1)