NTFYMessage

class ntfpy.NTFYMessage(message: str, id: str, timestamp: int, topic: str, title: str | None = None, priority: int | None = None, tags: Sequence[str] | None = None, click: str | None = None, attach: Any | None = None, actions: Any | None = None, email: str | None = None, delay: str | None = None, icon: str | None = None)
Variables:
  • message (str) – message’s content

  • id (int) – message’s id

  • timestamp (int) – message’s timestamp (unix)

  • topic (str) – message’s topic

  • title (Optional[str]) – message’s title

  • priority (Optional[int]) – message’s priority

  • tags (Optional[Sequence[str]]) – message’s tags

  • click (Optional[str]) – message’s click url

  • attach (Optional[Any]) – message’s attachments

  • actions (Optional[Any]) – message’s actions

  • email (Optional[str]) – message’s email

  • delay (Optional[str]) – message’s delay

  • icon (Optional[str]) – message’s icon

NTFYPushMessage

class ntfpy.NTFYPushMessage(message: str, title: str | None = None, priority: Literal[1, 2, 3, 4, 5] | None = None, tags: Sequence[str] | None = None, click_url: str | None = None, attach: NTFYUrlAttachment | None = None, actions: Sequence[NTFYAction] | None = None, email: str | None = None, delay: str | None = None, icon_url: str | None = None)
Variables:
  • message (str) – message’s content

  • title (Optional[str]) – message’s title

  • priority (Optional[int]) – message’s priority

  • tags (Optional[Sequence[str]]) – message’s tags

  • click_url (Optional[str]) – message’s click url

  • attachment (Optional[Any]) – message’s attachments

  • actions (Optional[Any]) – message’s actions

  • email (Optional[str]) – message’s email

  • delay (Optional[str]) – message’s delay

  • icon_url (Optional[str]) – message’s icon url

addTag(tag: str)
Parameters:

tag (str) – tag to add

removeTag(tag: str)
Parameters:

tag (str) – tag to remove

addAction(action: NTFYAction)
Parameters:

action (NTFYAction) – action to add

removeAction(action: NTFYAction)
Parameters:

action (NTFYAction) – action to remove

json(topic: str) Mapping[str, Any]