correspond.channels.apprise#
Apprise: send-only notifications to the long tail of services (about 155), each named by an alias.
References
apprise:<alias>, an alias being 1-64 of a-z, 0-9 and - (case is
folded; all and always are Apprise’s match-everything tags, so they are refused). A
reference never holds an Apprise URL, because the URL
carries the service’s credentials (discord://webhook_id/webhook_token,
tgram://bot_token/chat_id…). The alias is resolved, in this order:
$CORRESPOND_APPRISE_URL_<ALIAS>(upper case,-as_), holding ONE URL;on macOS, the Keychain item
correspond-apprise-url-<alias>, likewise;the local Apprise configuration file named by
configin the[apprise]table (or$CORRESPOND_APPRISE_CONFIG), where the alias is an Apprise tag: every URL in the file carrying exactly that tag is notified (see the configuration-file documentation linked from https://pypi.org/project/apprise/). URLs taggedalwaysare NOT added: an alias names its recipients, and a typo must not reach anyone.
A dry run reads only the environment and the config file: a Keychain alias is looked up when sending, and the plan says so. The plan names the service (the URL’s scheme), never the URL, and Apprise’s own logging, which prints URLs, is silenced while correspond calls it.
Needs the apprise extra: pip install "correspond[apprise]". It is imported when a
message is sent, not when the channel is listed.
>>> Apprise().parse_ref("team-alerts").kind
'alias'
Functions
|
The environment variable holding one alias's Apprise URL. |
Classes
|
Apprise URLs and tags, behind aliases: send only. |
- class correspond.channels.apprise.Apprise(*, apprise=<function _import_apprise>, keychain=None, keychain_available=None)[source]#
Bases:
objectApprise URLs and tags, behind aliases: send only.
- audience(ref, *, draft=None)[source]#
Public and incomplete: Apprise reaches anything from one phone to a public channel, and nothing here can tell which.
Nothing is resolved or asked: not the URL, not the service.
- Return type:
- property capabilities: Capabilities#
Send only, with a title; who reads depends on the service behind each alias.
- parse_ref(id)[source]#
An alias: 1-64 of
a-z,0-9and-, case folded; neveralloralways.One spelling per alias, so each has exactly one environment variable and one Keychain item (
a-banda_bwould share..._A_B).- Return type: