{ "info": { "author": "hxss", "author_email": "hxss@ya.ru", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.7", "Topic :: Utilities" ], "description": "# dnotify\n\nUtil for sending desktop notifications over dbus. Supports replace_id, hints and actions(mainloop required).\nRequires [dbus-python](https://pypi.org/project/dbus-python/).\n\n## Package usage\n\n### Create notify server:\n```\nserver = dnotify.NotifyServer('app_name')\n```\n### Create notify:\n```\nnotify = server.Notify('summary')\n```\n### Configure notify.\nYou can setnotify options by default property setter `notify.body = 'body'` or using fluent setters:\n```\nnotify.set_id(0)\\\n\t.set_icon('icon')\\\n\t.set_timeout(10000) # ms\n```\n\n### Extra options\n\n#### Hints\n\nFor workings with hints use this methods:\n\n```\nnotify.set_hint(key, value)\nnotify.get_hint(key)\nnotify.del_hint(key)\n```\n\n#### Actions\n\n**For using actions and event you need to specify notify server mainloop.**\n\nYou can add or delete action:\n\n```\nnotify.add_action(dnotify.Action('label', callback))\nnotify.del_action(dnotify.Action('label', callback))\n```\n\nAlso supported `on_close` event:\n\n```\nnotify.set_on_close(callback)\n```\n\n### Mainloop\n\n`dbus-python` supports `glib` and `qt` mainloops.\n\n```\nserver = dnotify.NotifyServer('app_name')\\\n\tset_mainloop(dnotify.MAINLOOOP_GLIB)\\\n\tset_mainloop(dnotify.MAINLOOOP_QT)\n```\n\n## Console usage\n\n```\nusage: dnotify [--help] [--icon ICON] [--id REPLACE_ID] [--timeout TIMEOUT]\n [--hints key:value [key:value ...]]\n Summary [Body]\n\nSend desktop notification. Returns created notification's id.\n\npositional arguments:\n Summary The summary text briefly describing the notification.\n Body The optional detailed body text. Can be empty.\n\noptional arguments:\n --help show this help message and exit\n --icon ICON, -i ICON The optional program icon of the calling application.\n Should be either a file path or a name in a\n freedesktop.org-compliant icon theme.\n --id REPLACE_ID An optional ID of an existing notification that this\n notification is intended to replace.\n --timeout TIMEOUT, -t TIMEOUT\n The timeout time in milliseconds since the display of\n the notification at which the notification should\n automatically close.\n --hints key:value [key:value ...], -h key:value [key:value ...]\n use \"--\" to separate hints list from positional args\n```\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/hxss/dnotify", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "dnotify", "package_url": "https://pypi.org/project/dnotify/", "platform": "", "project_url": "https://pypi.org/project/dnotify/", "project_urls": { "Homepage": "https://gitlab.com/hxss/dnotify" }, "release_url": "https://pypi.org/project/dnotify/1.0.1/", "requires_dist": [ "dbus-python (>=1.2.8)" ], "requires_python": ">=3.7", "summary": "Util for sending desktop notifications over dbus.", "version": "1.0.1" }, "last_serial": 5169907, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "3c49ca82f3aa4aeed41ffe55d5518808", "sha256": "75169b8cef26e5ff50788860e68dec8dcff0adfac065cbc9170ad43fac933d28" }, "downloads": -1, "filename": "dnotify-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "3c49ca82f3aa4aeed41ffe55d5518808", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 6340, "upload_time": "2019-04-21T14:06:48", "url": "https://files.pythonhosted.org/packages/55/17/573bd4b62f3363d22b6987cf83104451af3ff7494a71524b19d14ce72514/dnotify-1.0.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3c49ca82f3aa4aeed41ffe55d5518808", "sha256": "75169b8cef26e5ff50788860e68dec8dcff0adfac065cbc9170ad43fac933d28" }, "downloads": -1, "filename": "dnotify-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "3c49ca82f3aa4aeed41ffe55d5518808", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 6340, "upload_time": "2019-04-21T14:06:48", "url": "https://files.pythonhosted.org/packages/55/17/573bd4b62f3363d22b6987cf83104451af3ff7494a71524b19d14ce72514/dnotify-1.0.1-py3-none-any.whl" } ] }