ap·prise / verb
To inform or tell (someone). To make one aware of something.
Apprise allows you to take advantage of just about every notification service available to us today. Send a notification to almost all of the most popular services out there today (such as Telegram, Slack, Twitter, etc). The ones that don't exist can be adapted and supported too!
See the wiki for the most recent documentation.
A small command line tool is also provided with this package called apprise. If you know the server url's you wish to notify, you can simply provide them all on the command line and send your notifications that way:
# Send a notification to as many servers as you want # as you can easily chain one after another: apprise -t 'my title' -b 'my notification body' \ 'mailto://myemail:firstname.lastname@example.org' \ 'pbul://o.gn5kj6nfhv736I7jC3cj3QLRiyhgl98b' # If you don't specify a --body (-b) then stdin is used allowing # you to use the tool as part of your every day administration: cat /proc/cpuinfo | apprise -t 'cpu info' \ 'mailto://myemail:email@example.com' # The title field is totally optional uptime | apprise \ 'discord:///4174216298/JHMHI8qBe7bk2ZwO5U711o3dV_js'
No one wants to put there credentials out for everyone to see on the command line. No problem apprise also supports configuration files. It can handle both a specific YAML format or a very simple TEXT format. You can also pull these configuration files via an HTTP query too! More information concerning Apprise configuration can be found here
# By default now if no url or configuration is specified aprise will # peek for this data in: # ~/.apprise # ~/.apprise.yml # ~/.config/apprise # ~/.config/apprise.yml # If you loaded one of those files, your command line gets really easy: apprise -t 'my title' -b 'my notification body' # Know the location of the configuration source? No problem, just # specify it. apprise -t 'my title' -b 'my notification body' \ --config=/path/to/my/config.yml # Got lots of configuration locations? No problem, specify them all: apprise -t 'my title' -b 'my notification body' \ --config=/path/to/my/config.yml \ --config=https://localhost/my/apprise/config
To send a notification from within your python application, just do the following:
import apprise # Create an Apprise instance apobj = apprise.Apprise() # Add all of the notification services by their server url. # A sample email notification apobj.add('mailto://myemail:firstname.lastname@example.org') # A sample pushbullet notification apobj.add('pbul://o.gn5kj6nfhv736I7jC3cj3QLRiyhgl98b') # Then notify these services any time you desire. The below would # notify all of the services loaded into our Apprise object. apobj.notify( body='what a great notification service!', title='my notification title',
Developers need access to configuration files too. The good news is their use just involves declaring another object (called AppriseConfig) that the Apprise object can ingest. You can also freely mix and match config and notification entries as often as you wish!
import apprise # Create an Apprise instance apobj = apprise.Apprise() # Create an Config instance config = apprise.AppriseConfig() # Add a configuration source: config.add('/path/to/my/config.yml') # Add another... config.add('https://myserver:8080/path/to/config') # Make sure to add our config into our apprise object apobj.add(config) # You can mix and match; add an entry directly if you want too # In this entry we associate the 'admin' tag with our notification apobj.add('mailto://myemail:email@example.com', tag='admin') # Then notify these services any time you desire. The below would # notify all of the services loaded into our Apprise object; this includes # all items identified in the configuration files. apobj.notify(body='what a great notification service!') # If you're using tagging, then you can load all of your notifications # but only selectively notify the ones associated with one or more # matched tags: apobj.notify( body='send a notification to our admin group' title='Attention Admins', # notify any services tagged with the 'admin' tag tag='admin', )
The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).
|Epel for CentOS 7||x86_64 (0)*||Epel for CentOS 7 (42 downloads)|
|Epel for CentOS 8||x86_64 (0)*||Epel for CentOS 8 (6 downloads)|
|Fedora 30||i386 (0)*, x86_64 (0)*||Fedora 30 (21 downloads)|
|Fedora 31||i386 (0)*, x86_64 (0)*||Fedora 31 (8 downloads)|
|Fedora 32||i386 (0)*, x86_64 (0)*||Fedora 32 (5 downloads)|
|Fedora rawhide||i386 (0)*, x86_64 (0)*||Fedora rawhide (57 downloads)|
* Total number of packages downloaded in the last seven days.