Skip to main content

apprise-notify-py

CI

Send a notification to an Apprise API server from a small Python script or CronJob. One function, standard library only, no dependencies.

from apprise_notify import notify

if not notify("http://apprise:8000/notify/alerts", "Backup failed", "restic exited 1", "failure"):
    ...  # not delivered: don't record it as sent

notify(apprise_url, title, body, type_="info", timeout=15, format_=None) POSTs {"title", "body", "type"} as JSON and returns whether it was delivered. A key with no configuration on the server (apprise-api's HTTP 204) counts as not delivered. type_ is Apprise's severity: info, success, warning or failure. format_ (text, markdown or html) adds Apprise's format field, for example to send links; left out, the body is plain text. An empty URL turns notifications off and returns False. Errors are printed to stderr and never raised, so a notification problem can't crash the caller.

Several Apprise servers

apprise_url can also name several servers, in order of preference: a list, or one string with the URLs separated by spaces (handy for a single environment variable).

notify(
    ["http://apprise.local:8000/notify/alerts", "https://apprise.example.org/notify/alerts"],
    "Backup failed",
    "restic exited 1",
    "failure",
)

The URLs are tried in order and the first one that delivers wins; the rest are not called. This is a failover, not a fan-out, so two servers that share the same Telegram bot don't send the message twice.

Answer from a URL What happens
2xx (not 204) delivered: return True
network error, timeout or 5xx retry that URL once after one second, then move to the next
4xx, or 204 (no configuration for the key) move to the next URL at once; a retry wouldn't change the answer

notify returns False when no URL delivers. timeout applies to each attempt, so the worst case is about 2 × timeout per URL.

Passing None reads the URLs from the APPRISE_URLS environment variable (same space-separated format); an unset or empty variable turns notifications off. An empty string still turns them off without looking at the environment.

notify(None, "Backup failed", "restic exited 1", "failure")  # APPRISE_URLS="http://a/notify/k http://b/notify/k"

A single URL behaves as in 1.1.x, except that a network error or 5xx is now retried once.

Install

From PyPI (1.2.0 and later):

pip install apprise-notify
# pyproject.toml
dependencies = ["apprise-notify>=1.2"]

Release tags keep working for callers that pin one:

dependencies = ["apprise-notify @ git+https://github.com/mbologna/apprise-notify-py@v1.2.0"]

Versioning

Releases follow SemVer: auto-release tags vX.Y.Z from the Conventional Commit types on main (feat minor; fix, perf, revert patch; a breaking change major), on Monday's scheduled CI run or a manual run, and starts publish.yml on the new tag. That workflow builds the package with the tag's version and uploads it to PyPI as X.Y.Z through Trusted Publishing: no PyPI token is stored in the repository. The version in pyproject.toml is not bumped by the release. See the versioning standard.

Development

uv.lock only takes releases at least 7 days old (exclude-newer in pyproject.toml), so a freshly published, compromised package can't land in the lock. A CVE fix released less than 7 days ago needs a temporary exclude-newer-package = { <package> = false } override in [tool.uv] followed by uv lock --upgrade-package <package>; drop the override once the release is a week old.

Local checks run with pre-commit: uv run pre-commit install once, or uv run pre-commit run --all-files. The skeleton (CI, pre-commit, pyproject.toml tooling) comes from python-app-template.

Metadata

Release files for apprise-notify 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apprise-notify 1.2.1
File Size Uploaded Provenance Actions
apprise_notify-1.2.1.tar.gz 5.5 kB With provenance Details for apprise_notify-1.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apprise-notify 1.2.1
File Interpreter ABI Platform Actions
apprise_notify-1.2.1-py3-none-any.whl Python 3 none any Details for apprise_notify-1.2.1-py3-none-any.whl

Total release size: 10.6 kB

Release files / apprise_notify-1.2.1.tar.gz

Download URL apprise_notify-1.2.1.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c5968f0450e2f9151b7bb7b8e26583d4833549a45942d0f1f6ed1cb2298d9e0f
BLAKE2b-256 checksum
How to use checksums
17888aca77b97fa8f4126eaab1a9e54f28a479d2a8f70be3b51399bf203604e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / apprise_notify-1.2.1-py3-none-any.whl

Download URL apprise_notify-1.2.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82ef7975deb53c323e3b926eaaab1b6e4e6452c78e3b51b512778e0f4f9057bd
BLAKE2b-256 checksum
How to use checksums
fef9a6e9d224250ddb91bd95f41ca01291fad26cc593198a203249c0e9409ca1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Security for apprise-notify 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for apprise_notify-1.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page