ntfy.backends package¶
Submodules¶
ntfy.backends.darwin module¶
-
ntfy.backends.darwin.
notify
(title, message, retcode=None)¶ adapted from https://gist.github.com/baliw/4020619
ntfy.backends.default module¶
-
exception
ntfy.backends.default.
DefaultNotifierError
(exception, module)¶ Bases:
exceptions.Exception
-
ntfy.backends.default.
notify
(title, message, **kwargs)¶ This backend automatically selects the correct desktop notification backend for your operating system.
ntfy.backends.linux module¶
-
ntfy.backends.linux.
notify
(title, message, icon='/home/docs/.local/share/ntfy/icon.png', retcode=0)¶
ntfy.backends.pushbullet module¶
-
ntfy.backends.pushbullet.
notify
(title, message, access_token, device_iden=None, email=None, retcode=None)¶ - Required parameter:
access_token
- Your Pushbullet access token, created at
- Optional parameters:
device_iden
- a device identifier, if omited, notification issent to all devices
email
- send notification to pushbullte user with the specifiedemail or send an email if they aren’t a pushullet user
ntfy.backends.pushover module¶
-
ntfy.backends.pushover.
notify
(title, message, user_key, api_token='aUnsraBiEZVsmrG89AZp47K3S2dX2a', device=None, sound=None, priority=0, expire=None, retry=None, callback=None, url=None, url_title=None, html=False, retcode=None)¶ - Required parameters:
user_key
- Optional parameters:
sound
priority
expire
retry
callback
api_token
- use your own application tokendevice
- target a device, if omitted, target all devicesurl
url_title
html
ntfy.backends.simplepush module¶
-
ntfy.backends.simplepush.
notify
(title, message, key, event=None, retcode=None)¶ - Required paramter:
key
- The Simplepush identification key, created by
installing the Android App (https://simplepush.io)
- Optional parameters:
event
- use custom ringtones and vibration patterns
ntfy.backends.notifico module¶
-
ntfy.backends.notifico.
notify
(title, message, retcode=None, webhook=None)¶ - Required parameter:
webhook
- The webhook link, created at https://n.tkte.ch/(choose
Plain Text
service when creating the webhook)
ntfy.backends.insta module¶
ntfy.backends.win32 module¶
-
ntfy.backends.win32.
notify
(title, message, icon='/home/docs/.local/share/ntfy/icon.ico', retcode=None)¶ - Optional parameters:
icon
- path to an ICO file to display instead of the ntfy icon
ntfy.backends.xmpp module¶
ntfy.backends.systemlog module¶
-
ntfy.backends.systemlog.
notify
(title, message, prio='ALERT', facility='LOCAL5', fmt='[{title}] {message}', retcode=None)¶ Uses the
syslog
core Python module, which is not available on Windows platforms.- Optional parameters:
prio
- Syslog prority level. Default isALERT
. Possible values are:- EMERG
- ALERT
- CRIT
- ERR
- WARNING
- NOTICE
- INFO
- DEBUG
facility
- Syslog facility. Default isLOCAL5
. Possible values are:- KERN
- USER
- DAEMON
- AUTH
- LPR
- NEWS
- UUCP
- CRON
- SYSLOG
- LOCAL0
- LOCAL1
- LOCAL2
- LOCAL3
- LOCAL4
- LOCAL5
- LOCAL6
- LOCAL7
fmt
- Format of the message to be sent to the system logger. The title and the message are specified using the following placeholders:{title}
{message}
Default is
[{title}] {message}
.