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
from pyntfy import actions
notif = pyntfy.Notification('test_actions', 'Hello, world!')
notif.add_action(actions.ViewAction('Label', 'https://www.example.com/'))
notif.send()
Planned Features
- 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.0.tar.gz
(5.7 kB
view hashes)
Built Distribution
pyntfy-0.2.0-py3-none-any.whl
(7.6 kB
view hashes)