A module for interacting with ntfy.sh notifications.
Project description
pyntfy
A module for interacting with ntfy.sh notifications.
Installation
You can install pyntfy via pip.
$ pip install pyntfy
Usage
import pyntfy
# Send a sample notification.
notif = pyntfy.Notification('test_notification', 'Hello, world!', title='Notification Title')
notif.send()
# Send a timed notification.
timed_notif = pyntfy.Notification('test_notification', 'Hello, world!', title='Notification Title', delay='1m')
timed_notif.send()
Actions
import pyntfy
notif = pyntfy.Notification('test_actions', 'Hello, world!')
notif.add_action(pyntfy.actions.ViewAction('Label', 'https://www.example.com/'))
notif.send()
Planned Features
- Webhook support.
- Allow for JSON data as input.
- Proper tests.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyntfy-0.2.1.tar.gz
(5.3 kB
view hashes)
Built Distribution
pyntfy-0.2.1-py3-none-any.whl
(6.8 kB
view hashes)