I would like to introduce ntfy because it was convenient.
With ntfy, you can easily send push notifications to various apps from the Linux command line or scripts. Written in Python. I support a lot, but I tried the following three:
-Pushover (It's convenient, but the app costs about 500 yen. Isn't it cheap if you can buy peace of mind at this price?) -slack (I think it's useful if your team uses slack.) -Pushbullet (The Chrome browser app can be used, but the smartphone app was not good so far.)
As a result, Pushover was necessary and sufficient, so I use Pushover.
Easy to install with pip.
pip install ntfy #When using slack pip install ntfy[slack]
~ / .ntfy.yml
token and ʻuser_key
from the setting screen of the application you are using and write it in ~ / .ntfy.yml` as follows.
--- backends: - pushover - slack - pushbullet pushover: user_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx slack: token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx recipient: "#general" pushbullet: access_token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#Simply push notification ntfy -t 'Test' send "This is a test." #Notify when the command finishes(Example: sleep command) ntfy done sleep 10
If the settings are correct, the app will be notified. (The
-t option is the title of the message.)
>>> import ntfy >>> ntfy.backends.pushover.notify(title="Test", message="This is a test.", user_key="XXXXXXXXXXXXXXXXXXXX")
Useful for fault alerts and time-consuming batch job execution.