ntfy notifications
Available with enable_ntfy=true. The service publishes to an existing ntfy instance using httpx2. No notification daemon, automatic log forwarding or public publishing route is installed.
Configure
Section titled “Configure”Set values in the private .env file:
NTFY_URL=https://ntfy.example.comNTFY_TOPIC=backup-alertsNTFY_TOKEN=tk_your_access_tokenNTFY_TIMEOUT_SECONDS=5Replace the example hostname and token. Subscribe to the protected topic using an ntfy client. Use HTTPS over the network.
Publish
Section titled “Publish”uv run backup-service notify "Backup completed" --title Backup --priority 3From asynchronous application code:
from backup_service.notifications import notify
message_id = await notify( "Backup completed", title="Backup", priority=4, tags=["white_check_mark"],)Priorities range from 1 to 5. The function returns the accepted ntfy message ID and raises on failure. No automatic retries are performed because publishing twice may duplicate notifications.
A notification outage does not make the API unready. Handle failures according to the importance of the calling operation. Do not include secrets or sensitive personal data in notifications.