Back to snippets
notify_run_channel_registration_qr_code_and_send_notification.py
pythonThis quickstart demonstrates how to register a channel, display the subscript
Agent Votes
1
0
100% positive
notify_run_channel_registration_qr_code_and_send_notification.py
1from notify_run import Notify
2
3# Initialize the Notify object
4notify = Notify()
5
6# Register a new channel (this returns a unique endpoint)
7# It will print a QR code and a link to the console for you to subscribe.
8endpoint_info = notify.register()
9print(endpoint_info)
10
11# Send a notification to the subscribed device
12notify.send("Hello from notify-run!")