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__() accepts a small number of explicit arguments, plus **kwargs.

  • The explicit arguments (plugin_paths, storage_*, timezone) are validated and normalised.
  • **kwargs can override any existing asset attribute, and will raise if an invalid key is provided.

This is intentional. It prevents configuration files from quietly setting unknown fields and it keeps the surface area strict.


This table documents the actual defaults from the implementation, plus where each field is used. Fields prefixed with _ or __ are intentionally not configuration-file addressable.

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.
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→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→token mapascii()Default ASCII tokens for text-only contexts.
default_ascii_charsstr[?]ascii()Used when a mapping is missing.
FieldTypeDefaultUsed byNotes
body_formatNotifyFormatNoneNoneFormatting pipeline If None, no pre-formatting is applied by default.
interpret_emojisboolNoneNoneMessage pre-processing. If None, it defers to per-service configuration (for example, emojis=yes at the URL level).
interpret_escapesboolFalseMessage pre-processingEnables \n, \t, etc. prior to sending.
encodingstrutf-8EncodingUsed when encoding internal strings for processing. Plays a roll in how some services output their content upstream. It is advised to leave this at utf-8
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].
FieldTypeDefaultUsed byNotes
plugin_pathslist[str][]Custom plugin loadingTriggers module detection at asset initialisation time.
FieldTypeDefaultUsed byNotes
storage_path`strNone`NonePersistentStore 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 and persistent storage is configured, generates an RSA-2048 key pair ({localpart}-pub.asc + {localpart}-prv.asc) the first time no key is found. Only applies to pgp=encrypt mode — the opportunistic-encrypt step of pgp=sign never auto-generates.
pem_autogenboolTruePEM controllerEnables auto-generation of PEM keys when storage allows it and no key is provided.

When pgp_autogen = True, Apprise generates both a public and a private key on the first pgp=encrypt send where no key is found:

  • {localpart}-pub.asc — RSA-2048 public key, used to encrypt outbound messages
  • {localpart}-prv.asc — RSA-2048 private key, auto-discovered by pgp=sign mode

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

This means bootstrapping is automatic: configure pgp=encrypt once with persistent storage, let the first send generate both keys, then switch to pgp=sign and the private key will be discovered from the same storage directory without any pgpprv= parameter.

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. Apprise falls back to the next discovery method (WKD or an explicit pgppub= path) and fails the send if no key is found.

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.
_recursionint0Apprise API recursion guardPrevents loops when one Apprise API instance calls another.
_uidstrrandom UUID4Correlation / identityInternal identifier, intended for internal correlation.
_tzinfotzinfosystem tzTime-based behaviourThe resolved timezone object used by plugins that need localised timestamps.

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.

The asset internally tracks recursion depth to prevent notification loops, particularly when Apprise instances interact with one another.

The following fields cannot be set via configuration files:

  • plugin_paths
  • storage_*
  • Internal flags prefixed with _

These must be provided programmatically to prevent untrusted code execution.

  • Tag Routing & Retry — how to configure priority tags, per-service retry/wait, and per-call overrides in configuration files.
Questions or Feedback?

Documentation

Notice a typo or an error? Report it or contribute a fix .

Technical Issues

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

Made with love from Canada