User guide
The goal of this library is to make it as easy to use as possible. This page will list the documentation of the client function. For examples, please check the examples.
create_notification(title='Notification', subtitle=None, text=None, icon=None, sound=None, delay=timedelta(), action_button_str=None, action_callback=None, reply_button_str=None, reply_callback=None, snooze_button_str=None)
Create a MacOS notification :)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title |
str
|
Title of the notification. |
'Notification'
|
subtitle |
str | None
|
The subtitle of the notification. |
None
|
text |
str | None
|
The text/main body of the notification. |
None
|
icon |
str | Path | None
|
An Icon you would like to set on the right bottom. |
None
|
delay |
timedelta
|
Delay before showing the message. |
timedelta()
|
action_button_str |
str | None
|
The string of the Action button. |
None
|
action_callback |
Callable[[], None] | None
|
The function to call when the action button is pressed. |
None
|
reply_button_str |
str | None
|
The string of the Reply button. |
None
|
reply_callback |
Callable[[str], None] | None
|
The function to call with the replied text. |
None
|
snooze_button_str |
str | None
|
This is a useless button that closes the notification (but not the process). Think of this as a snooze button. |
None
|
Source code in mac_notifications/client.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
|