This is a pure-python replacement for notify-python, using python-dbus to communicate with the notifications server directly. It’s compatible with Python 2 and 3, and its callbacks can work with Gtk 3 or Qt 4 applications.
To use it, first call notify2.init('app name'), then create and show notifications:
n = notify2.Notification("Summary",
"Some body text",
"notification-message-im" # Icon name
)
n.show()
API docs are available on ReadTheDocs, or you can refer to docstrings.
Based on the notifications spec at: http://developer.gnome.org/notification-spec/
Porting applications from pynotify
There are a few differences from pynotify you should be aware of:
If you need callbacks from notifications, notify2 must know about your event loop. The simplest way is to pass ‘glib’ or ‘qt’ as the mainloop parameter to init.
The methods attach_to_widget and attach_to_status_icon are not implemented. You can calculate the location you want the notification to appear and call Notification.
set_property and get_property are not implemented. The summary, body and icon are accessible as attributes of a Notification instance.
Various methods that pynotify Notification instances got from gobject do not exist, or only implement part of the functionality.
Several pynotify functions, especially getters and setters, are only supported for compatibility. You are encouraged to use more direct, Pythonic alternatives.
Metadata
Release files for notify2 0.3.1
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 |
|---|---|---|---|---|
| notify2-0.3.1.tar.gz | 17.8 kB | Without provenance | Details for notify2-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| notify2-0.3.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for notify2-0.3.1-py2.py3-none-any.whl |
Total release size: 25.8 kB
Release files / notify2-0.3.1.tar.gz
| Download URL | notify2-0.3.1.tar.gz |
|---|---|
| Size | 17.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
33fa108d50c42f3cd3407cc437518ad3f6225d1bb237011f16393c9dd3ce197d
|
|
BLAKE2b-256 checksum How to use checksums |
aae8d4b335aa739dc299a77766ecc5f1972d1de1993524aa94acef3219bba315
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / notify2-0.3.1-py2.py3-none-any.whl
| Download URL | notify2-0.3.1-py2.py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d7e27e63c2120c074225e526754101e22f029e38e5f002b1ceaa965258bf1073
|
|
BLAKE2b-256 checksum How to use checksums |
f96999d2bc2d98a802b6f58d1e0a774a933b3fea5ef11455379561b71c04370b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for notify2 0.3.1
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.