{"library":"notify2","title":"notify2 - DBus Desktop Notifications","description":"notify2 is a Python interface to DBus notifications, allowing applications to send desktop notifications via the freedesktop.org Desktop Notifications Specification. It provides a simple API to initialize an application, create notifications with summaries, bodies, and icons, and control their display. The current version is 0.3.1, released in 2017. The project appears to be in maintenance mode, with no new feature development expected.","language":"python","status":"maintenance","last_verified":"Fri Apr 17","install":{"commands":["pip install notify2"],"cli":null},"imports":["import notify2","n = notify2.Notification(...)"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import notify2\nimport os\n\n# Initialize the notification system with your app name\n# This is required before sending any notifications\nnotify2.init(os.environ.get('NOTIFY_APP_NAME', 'MyPythonApp'))\n\n# Create a new notification\n# Arguments: summary, body (optional), icon (optional)\nn = notify2.Notification(\n    \"Hello from notify2!\", \n    \"This is a test notification generated by a Python script.\",\n    icon='dialog-information' # Example icon name (often from GTK/freedesktop theme)\n)\n\n# Set a timeout for the notification (in milliseconds)\n# -1 means 'never expire' (if supported by daemon), 0 means 'default'\nn.set_timeout(5000) # 5 seconds\n\n# Show the notification\nn.show()\nprint(\"Notification sent! Check your desktop.\")","lang":"python","description":"This quickstart initializes `notify2`, creates a basic desktop notification with a summary, body, and icon, sets a timeout, and displays it. Requires a running DBus session and a notification daemon (e.g., dunst, xfce4-notifyd) on a Linux desktop environment.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}