NTFYClient

class ntfpy.NTFYClient(server: NTFYServer, topic: str, user: NTFYUser | None = None)
Variables:
send(message: str, title: str | None = None, priority: Literal[1, 2, 3, 4, 5] | None = None, tags: str | None = None, click: str | None = None, attach: NTFYUrlAttachment | None = None, actions: Sequence[NTFYAction] | None = None, email: str | None = None, delay: str | None = None, icon: str | None = None) Response
Parameters:
  • message (str) – message’s content

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

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

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

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

  • attach (Optional[NTFYUrlAttachment]) – message’s url attachment

  • actions (Optional[Sequence[NTFYAction]]) – message’s actions

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

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

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

Return type:

requests.Response

send_message(message: NTFYPushMessage) Response
Parameters:

message (NTFYPushMessage) – message to send

async subscribe(handler: ~typing.Callable[[~ntfpy.types.message.NTFYMessage], None] = <built-in function print>)
Parameters:

handler (Callable[[NTFYMessage], None]) – function to handle printing of received messages; by default it’s print()