Skip to content

Assets & Branding

AppriseAsset defines the global execution context for an Apprise session.

It is not limited to branding or theming. An asset instance influences behaviour across:

  • All notification plugins
  • All delivery threads
  • Persistent storage and key material
  • Global safety boundaries (log redaction and recursion protection)

Under usual conditions, an asset is created once and then passed into Apprise(...) during its instantiation.

from apprise import Apprise, AppriseAsset
asset = AppriseAsset(app_id="My Application", theme="default")
apobj = Apprise(asset=asset)

If no asset is provided, Apprise creates a default one.

  • Created once, typically at application startup
  • Shared across all loaded plugins and configuration processing
  • Intended to be treated as immutable for the lifetime of an Apprise instance

Mutating an asset after it has been bound to Apprise can produce inconsistent results across plugins.

AppriseAsset.__init__() provides named arguments for storage, timeouts, payload limits, and other shared settings. Always use the documented constructor name, such as timezone=, service_timeout=, or payload_max_size=. These arguments validate values before applying them.

Python constructor arguments and YAML asset: keys are separate interfaces. Some settings are available to applications through AppriseAsset(...) but are intentionally unavailable to YAML configuration.


This table documents the actual defaults from the implementation, plus where each field is used.

FieldTypeDefaultUsed byNotes
app_idstrApprisePlugin headers, key generation namesUsed as a human-facing application identifier and as a default name in PGP key generation.
app_descstrApprise NotificationsMetadata / PresentationUsed by tooling and services that display an application description.
app_urlstrhttps://github.com/caronc/appriseMetadata / PresentationProvider URL exposed in docs and some plugin metadata.
themestrdefaultIcon URL/path resolutionDrives {THEME} substitution for icon lookup.
languagestrsystem languageTranslated textSets the language Apprise uses for its own text, such as the field names returned by details(). Accepts en, en-CA, or en_CA. A region falls back to its plain language, then to English, when no translation is installed. YAML accepts language or its lang alias.
default_extensionstr.pngIcon URL/path resolutionUsed when extension is not provided to image_url() or image_path().
default_image_sizeNotifyImageSizeXY_256Icon URL resolutionUsed when size is omitted.
image_url_maskstrGitHub raw URLimage_url()Produces a themed image URL for NotifyType + size.
image_url_logostrGitHub raw URLimage_url(logo=True)Used for the application logo.
image_path_maskstrlocal assets/themes/...image_path() / image_raw()Used for local icon resolution and raw bytes loading.
FieldTypeDefaultUsed byNotes
html_notify_mapdict[NotifyType,str]type-to-hex mapcolor()Default colour mapping for HTML-capable services.
default_html_colorstr#888888color()Used when a mapping is missing.
ascii_notify_mapdict[NotifyType,str]type-to-token mapascii()Default ASCII tokens for text-only contexts.
default_ascii_charsstr[?]ascii()Used when a mapping is missing.
FieldTypeDefaultUsed byNotes
body_formatNotifyFormatNoneMessage pre-processingSelects the default input format. If None, no pre-formatting is applied.
interpret_emojisboolNoneMessage pre-processingControls emoji conversion. If None, it defers to each service (for example, emojis=yes at the URL level).
interpret_escapesboolFalseMessage pre-processingEnables \n, \t, etc. prior to sending.
encodingstrutf-8EncodingUsed when encoding strings for processing and by some services when sending content. Keep the default unless a service requires another encoding.
FieldTypeDefaultUsed byNotes
async_modeboolTrueDelivery orchestrationControls concurrent vs sequential dispatch.
default_service_retryint0Per-service retryFallback retry count for any service that does not set ?retry= in its URL. Clamped to [0, 10].
default_service_waitfloat0.5Per-service retryFallback inter-retry pause (seconds) for services without ?wait=. Clamped to [0.0, 20.0].
service_timeoutint / float60.0Per-service timeoutMaximum seconds a single service (including all of its retries) may take before Apprise gives up on it and reports a TIMEOUT. 0 disables the limit. See Notification Results.
result_log_memory_sizeint0Result logsBytes kept in memory before result logs spill to temporary disk storage. Used only when result_log_disk_size is greater than 0.
result_log_disk_sizeint0Result logsMaximum temporary disk space for one notification result. 0 keeps all result logs in memory.
FieldTypeDefaultUsed byNotes
plugin_pathslist[str][]Custom plugin loadingTriggers module detection at asset initialisation time.
FieldTypeDefaultUsed byNotes
storage_pathstrNonePersistentStorePersistentStore root. If unset, Apprise operates memory-only for storage-backed features.
storage_modePersistentStoreModeautoPersistentStore behaviourauto, flush, memory.
storage_idlenint8Namespace generationControls how long generated namespace directories are.
storage_saltbytesb""Namespace generationProvides optional salting for namespace generation, string values are encoded using encoding.
FieldTypeDefaultUsed byNotes
pgp_autogenboolTruePGP controllerWhen True, a pgp=encrypt self-send may generate the sender’s RSA-2048 key pair in persistent storage. Recipient keys and pgp=sign keys are never generated.
pem_autogenboolTruePEM controllerEnables auto-generation of PEM keys when storage allows it and no key is provided.

When pgp_autogen = True, a pgp=encrypt self-send may generate both sender key files when no key is found:

  • {localpart}-pub.asc: RSA-2048 public key used for the self-send
  • {localpart}-prv.asc: RSA-2048 private key used for replies and later signing

{localpart} is derived from the sender’s From address (everything before @, lowercased).

The private key can later be discovered by pgp=sign from the same storage. Import it into the client that reads encrypted replies. External recipients always require an existing key; Apprise never generates one for them.

To disable auto-generation globally:

from apprise import AppriseAsset
asset = AppriseAsset(
storage_path="/var/lib/apprise",
pgp_autogen=False,
)

With pgp_autogen = False, no key pair is created automatically. A key must come from local storage, WKD, or an explicit pgppub= path.

FieldTypeDefaultUsed byNotes
http_redirectsboolTrueAll HTTP pluginsWhen True (the default), plugins follow 3xx redirects, matching the behaviour of the underlying requests library. Set to False to disable redirect following globally without touching individual URLs.
secure_loggingboolTrueLogging pipelineAdds overhead to redact secrets from logs, recommended to keep enabled.
allow_templatesboolTrueYAML configurationLets a YAML configuration declare a template: section and fill in ${NAME} markers. Set to False and the section is ignored, ${NAME} stays ordinary text, and nothing is read from the environment. See Template Variables.
payload_max_sizeint0Message formatting/splittingOptional input ceiling for the combined title and body. 0 disables it. Applies to every overflow= mode.
payload_buffer_thresholdint10Message formatting/splittingA title or body at or below this length may remain whole; see Payload Size Cap.
payload_min_bufferint25Message formatting/splittingCharacters reserved for the other side before keeping a short side whole; see Payload Size Cap.
timezonestr / tzinfosystem tzTime-based behaviourSets the timezone used by plugins that generate timestamps. Accepts an IANA name such as "America/Toronto" or a tzinfo object. YAML accepts timezone or its tz alias.

Configures the Apprise instance to use an altered branding.

from apprise import AppriseAsset
asset = AppriseAsset(
app_id="StatsBot",
app_desc="Metrics Aggregation Service",
app_url="https://example.com",
)

Apprise resolves icons using configurable masks.

asset = AppriseAsset(
image_path_mask="/icons/{THEME}/{TYPE}-{XY}{EXTENSION}",
image_url_mask="https://cdn.example.com/{TYPE}-{XY}{EXTENSION}",
)
TokenDescription
{THEME}Active theme
{TYPE}info, success, warning, failure
{XY}Image size
{EXTENSION}File extension

By default, Apprise follows HTTP 3xx redirects, matching the behaviour of the underlying requests library. If you want to prevent custom headers and credentials from being forwarded to destinations that differ from the original URL, you can disable redirect following globally:

asset = AppriseAsset(http_redirects=False)

Individual URLs can still override the asset default using the redirect= URL parameter:

# Override per-URL regardless of the asset setting
schema://token/?redirect=yes
schema://token/?redirect=no

When enabled, secrets are redacted from all logging output.

asset = AppriseAsset(secure_logging=True)

Disabling this is strongly discouraged outside isolated environments.

payload_max_size is the payload limit, or total character budget (N), for the title and body before formatting or splitting begins. A value of 0 disables the limit. If the title and body already fit within N, Apprise leaves both unchanged.

asset = AppriseAsset(payload_max_size=100000)

Three settings work together when the content is larger than N:

SettingDefaultPurpose
payload_max_size0Sets N, the total budget. 0 disables the limit.
payload_buffer_threshold10A title or body of this length or shorter may be kept whole.
payload_min_buffer25Space the other side must retain before the short side can be kept whole.

With the default values, an oversized payload is resolved in this order:

  1. One side is empty: The other side receives the full budget.
  2. One side is short: A title of 10 characters or fewer stays whole if the body can keep 25 characters, or its full length when shorter. The same rule then checks for a short body. If both qualify, the title is checked first.
  3. Otherwise: The title and body share N in proportion to their original lengths. When N has room for both, each keeps at least one character.

For example, a 20-character title and an 18-character body with N=20 split approximately 10/10. A smaller cap may still leave a short fragment, but it does not favor one side when both can be represented.

Library users can change both settings when constructing the asset:

asset = AppriseAsset(
payload_max_size=100000,
payload_buffer_threshold=10,
payload_min_buffer=25,
)

Setting payload_min_buffer=0 removes the reservation, so a qualifying short side may use the entire cap.

Formatting and escaping can add a few characters afterward. The limit applies to every overflow= mode, including upstream.

YAML deliberately supports a smaller set of asset settings than the Python constructor. Numeric controls such as service_timeout, payload_max_size, payload_buffer_threshold, and payload_min_buffer must be supplied through their named AppriseAsset(...) arguments. Plugin paths and storage settings are also application-controlled so configuration files cannot load code or redirect persistent storage.

timezone is supported in YAML and may also use the tz alias:

asset:
timezone: America/Toronto # or: tz: America/Toronto

language is supported in YAML and may also use the lang alias:

asset:
language: fr # or: lang: fr
  • Tag Routing & Retry — how to configure priority tags, per-service retry/wait, per-service timeouts, and per-call overrides in configuration files.
  • Notification Results — how a timed-out or failed service is reported back to you from notify().
Questions or Feedback?

Documentation

Notice a typo or an error?

Technical Issues

Having trouble with the code? Open an issue on GitHub:

Made with love from Canada