DESKTOP-NOTIFY
Util for sending desktop notifications over dbus. Supports replace_id, hints and actions(mainloop required).
Package usage
Basic notify:
notify = desktop_notify.aio.Notify('summary', 'body')
await notify.show()
notify = desktop_notify.glib.Notify('summary', 'body')
notify.set_on_show(callback) # optional
notify.show()
# or
notify.show_async()
Usage with server:
server = desktop_notify.aio.Server('app_name')
notify = server.Notify('summary')
await notify.show()
Configure notify.
You can setnotify options by default property setter notify.body = 'body' or using fluent setters:
notify.set_id(0)\
.set_icon('icon')\
.set_timeout(10000) # ms
Extra options
Hints
For workings with hints use this methods:
notify.set_hint(key, value)
notify.get_hint(key)
notify.del_hint(key)
Actions
For using actions and event you need to specify notify server mainloop.
You can add or delete action:
notify.add_action(desktop_notify.Action('label', callback))
notify.del_action(desktop_notify.Action('label', callback))
Also supported on_show and on_close event:
notify.set_on_show(callback(notify))
notify.set_on_close(callback(notify, close_reason))
Console usage
usage: desktop-notify [--help] [--icon ICON] [--id REPLACE_ID] [--timeout TIMEOUT]
[--hints key:value [key:value ...]]
Summary [Body]
Send desktop notification. Returns created notification's id.
positional arguments:
Summary The summary text briefly describing the notification.
Body The optional detailed body text. Can be empty.
optional arguments:
--help show this help message and exit
--icon ICON, -i ICON The optional program icon of the calling application.
Should be either a file path or a name in a
freedesktop.org-compliant icon theme.
--id REPLACE_ID An optional ID of an existing notification that this
notification is intended to replace.
--timeout TIMEOUT, -t TIMEOUT
The timeout time in milliseconds since the display of
the notification at which the notification should
automatically close.
--hints key:signature:value [key:signature:value ...], -h key:signature:value [key:signature:value ...]
use "--" to separate hints list from positional args
Metadata
Release files for desktop-notify 1.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| desktop-notify-1.3.3.tar.gz | 7.8 kB | Without provenance | Details for desktop-notify-1.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| desktop_notify-1.3.3-py3-none-any.whl | Python 3 | none | any | Details for desktop_notify-1.3.3-py3-none-any.whl |
Total release size: 17.8 kB
Release files / desktop-notify-1.3.3.tar.gz
| Download URL | desktop-notify-1.3.3.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62934ad1f72f292f9a3af5ffe45af32814af18c396c00369385540c72bf08077
|
|
BLAKE2b-256 checksum How to use checksums |
7ad87ae5779257f5f1aa0a2d50c02d70b29522bd414692f3d3bd18ef119fe82d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1
|
Release files / desktop_notify-1.3.3-py3-none-any.whl
| Download URL | desktop_notify-1.3.3-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ad7ecc3a9a603dd5fa3cdc11cc6265cfbc7f6df9d8ed240f4663f43ef0de37a
|
|
BLAKE2b-256 checksum How to use checksums |
0acda7e3bd0262f3e8a9272fd24d0193e24dad7cb4e4edd27da48e74b5523e59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1
|
Security for desktop-notify 1.3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.