Description
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!
Installation Instructions
See the wiki for the most recent documentation.
Command Line
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:mypass@gmail.com' \
'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:mypass@gmail.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
Developers
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:mypass@gmail.com')
# 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:mypass@gmail.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',
)
Active Releases
The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).
Release | Architectures | Repo Download |
---|---|---|
EPEL 9 | aarch64 (0)*, ppc64le (0)*, x86_64 (0)* | EPEL 9 (53 downloads) |
Fedora 38 | aarch64 (3)*, i386 (3)*, ppc64le (3)*, x86_64 (3)* | Fedora 38 (0 downloads) |
Fedora 39 | aarch64 (0)*, i386 (0)*, ppc64le (0)*, x86_64 (0)* | Fedora 39 (41 downloads) |
Fedora 40 | aarch64 (3)*, i386 (0)*, ppc64le (0)*, x86_64 (0)* | Fedora 40 (38 downloads) |
Fedora 41 | aarch64 (0)*, i386 (0)*, ppc64le (0)*, x86_64 (0)* | Fedora 41 (13 downloads) |
Fedora rawhide | aarch64 (0)*, i386 (0)*, ppc64le (0)*, x86_64 (8)* | Fedora rawhide (153 downloads) |
* Total number of downloaded packages.