apprise-notify-py
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"]
Releases
auto-release tags each release
from the Conventional Commits on main (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 through
Trusted Publishing: no PyPI
token is stored in the repository. The version in pyproject.toml is not
bumped by the release.
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.
Metadata
Release files for apprise-notify 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| apprise_notify-1.2.0.tar.gz | 4.7 kB | With provenance | Details for apprise_notify-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| apprise_notify-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for apprise_notify-1.2.0-py3-none-any.whl |
Total release size: 9.6 kB
Release files / apprise_notify-1.2.0.tar.gz
| Download URL | apprise_notify-1.2.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7169e71e2ed3c3801ac201392d911de381c9e3af326862fbdc52dcde400536ac
|
|
BLAKE2b-256 checksum How to use checksums |
3abd229e81bfd989af33a895ce23cdc250d77539b9adc5e07c97249e7569c542
|
| 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 16, 2026.
Transparency logRelease files / apprise_notify-1.2.0-py3-none-any.whl
| Download URL | apprise_notify-1.2.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7940afa5dcb075d32f62cdd639ac8bda70e779224dc53ee2f4b81475ea65a04d
|
|
BLAKE2b-256 checksum How to use checksums |
974e5d04764a6ec3cd755bf815ada40c21b5ab17c13d38e30a8e771ff3b3559d
|
| 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 16, 2026.
Transparency logSecurity for apprise-notify 1.2.0
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.
Attestation for apprise_notify-1.2.0.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 16, 2026.
Transparency logA 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.