or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

assets.mdattachments.mdconfiguration.mdcore-notifications.mdindex.mdlocalization.mdplugin-system.mdstorage.md
tile.json

index.mddocs/

Apprise

A comprehensive Python notification library that provides a unified interface for sending notifications to over 100 different notification services including Telegram, Discord, Slack, Amazon SNS, email providers, SMS services, and many more. Apprise offers both a command-line interface and a developer API with support for configuration files, file attachments, custom notification hooks, and asynchronous message delivery for optimal performance.

Package Information

  • Package Name: apprise
  • Language: Python
  • Installation: pip install apprise

Core Imports

import apprise

Common patterns:

from apprise import Apprise, AppriseConfig, AppriseAttachment
from apprise import NotifyType, NotifyFormat, OverflowMode

Basic Usage

import apprise

# Create an Apprise instance
apobj = apprise.Apprise()

# Add notification services using URLs
apobj.add('mailto://user:pass@gmail.com')
apobj.add('slack://TokenA/TokenB/TokenC/Channel')
apobj.add('discord://webhook_id/webhook_token')

# Send a notification
apobj.notify(
    body='my notification body',
    title='my title',
    notify_type=apprise.NotifyType.INFO
)

# Send with attachments
attach = apprise.AppriseAttachment('/path/to/file.jpg')
apobj.notify(
    body='Check out this image!',
    title='Photo Notification',
    attach=attach
)

Architecture

Apprise uses a plugin-based architecture with these core components:

  • Apprise: Main orchestrator managing multiple notification services
  • Plugins: Service-specific implementations (NotifyBase subclasses) supporting 100+ services
  • Configuration: Flexible config loading from files, URLs, and strings (AppriseConfig)
  • Attachments: File attachment support for various sources (AppriseAttachment)
  • Managers: Singleton managers for plugin discovery and loading
  • Assets: Customizable themes, icons, and branding (AppriseAsset)
  • Localization: Multi-language support for notifications (AppriseLocale)
  • Persistent Storage: State management for notification services (PersistentStore)

This design enables unified notification management across diverse services while maintaining extensibility and performance optimization.

Capabilities

Core Notification Management

Primary notification functionality including service management, message sending, and notification orchestration. The main Apprise class provides the foundation for all notification operations.

class Apprise:
    def __init__(self, servers=None, asset=None, location=None, debug=False): ...
    def add(self, urls, asset=None, tag=None): ...
    def notify(self, body, title='', notify_type=NotifyType.INFO, body_format=None, tag=None, match_always=True, attach=None, interpret_escapes=None): ...
    def async_notify(self, *args, **kwargs): ...
    def clear(self): ...
    def find(self, tag=None, match_always=True): ...
    def pop(self, index): ...
    def details(self, show_requirements=True, show_disabled=False, lang=None): ...
    def urls(self, privacy=False): ...
    @staticmethod
    def instantiate(url, asset=None, tag=None, suppress_exceptions=True): ...

Core Notification Management

Configuration Management

Configuration loading and management from files, URLs, and various formats. AppriseConfig enables centralized configuration of notification services.

class AppriseConfig:
    def __init__(self, paths=None, asset=None, cache=True, recursion=0, insecure_includes=False, **kwargs): ...
    def add(self, configs, asset=None, tag=None, cache=None, recursion=None, insecure_includes=None): ...
    def add_config(self, content, asset=None, tag=None, format=None): ...
    def servers(self, tag=None): ...
    def clear(self): ...
    def server_pop(self, index): ...
    def pop(self, index): ...
    @staticmethod
    def instantiate(url, asset=None, tag=None, cache=None): ...

Configuration Management

Attachment Handling

File attachment support for notifications including local files, URLs, and various attachment sources with size management and caching.

class AppriseAttachment:
    def __init__(self, paths=None, asset=None, cache=True, location=None): ...
    def add(self, attachments, asset=None, cache=None): ...
    def size(self): ...
    def clear(self): ...
    def pop(self, index): ...
    def sync(self): ...
    @staticmethod
    def instantiate(url, asset=None, cache=None): ...

Attachment Handling

Assets and Theming

Asset management for customizable themes, icons, branding, and visual elements used in notifications.

class AppriseAsset:
    def __init__(self, **kwargs): ...
    def color(self, notify_type, color_type=None): ...
    def image_url(self, notify_type, image_size, logo=False, extension=None): ...
    def image_path(self, notify_type, image_size, must_exist=True, extension=None): ...
    def image_raw(self, notify_type, image_size, must_exist=True, extension=None): ...
    def ascii(self, notify_type): ...
    def details(self): ...
    @staticmethod
    def hex_to_rgb(hex_color): ...
    @staticmethod
    def hex_to_int(hex_color): ...

Assets and Theming

Plugin Architecture

Base classes and managers for notification service plugins, configuration loaders, and attachment handlers. The plugin system enables extensibility and service discovery.

class NotifyBase(URLBase):
    def send(self, body, title='', notify_type=NotifyType.INFO, attach=None, **kwargs): ...
    def url(self, privacy=False, *args, **kwargs): ...
    def throttle(self, last_notification=None): ...

class NotificationManager:
    def plugins(self, include_disabled=True): ...
    def schemas(self): ...

Plugin Architecture

Internationalization and Localization

Multi-language support for notification content with locale management and text translation capabilities.

class AppriseLocale:
    def __init__(self, language=None): ...
    def add(self, lang=None, set_default=True): ...
    def lang_at(self, lang, mapto=None): ...
    @property
    def gettext(self): ...
    @staticmethod
    def detect_language(lang=None, detect_fallback=True): ...

Internationalization

Persistent Storage

State management and persistent storage for notification services supporting various storage modes and data persistence.

class PersistentStore:
    def __init__(self, path=None, namespace='default', mode=None): ...
    def read(self, key=None, compress=True, expires=False): ...
    def write(self, data, key=None, compress=True): ...
    def get(self, key, expires=False): ...
    def set(self, key, value, expires=False): ...
    def clear(self, *args): ...
    def flush(self, key=None, **kwargs): ...
    def prune(self): ...
    def size(self, **kwargs): ...

Persistent Storage

Types and Constants

Notification Types

class NotifyType:
    INFO = 'info'
    SUCCESS = 'success'
    WARNING = 'warning'
    FAILURE = 'failure'

NOTIFY_TYPES = [NotifyType.INFO, NotifyType.SUCCESS, NotifyType.WARNING, NotifyType.FAILURE]

Formats and Modes

class NotifyFormat:
    TEXT = 'text'
    HTML = 'html'
    MARKDOWN = 'markdown'

class OverflowMode:
    UPSTREAM = 'upstream'
    TRUNCATE = 'truncate'
    SPLIT = 'split'

class ConfigFormat:
    TEXT = 'text'
    YAML = 'yaml'

Image and Content Settings

class NotifyImageSize:
    XY_32 = '32x32'
    XY_72 = '72x72'
    XY_128 = '128x128'
    XY_256 = '256x256'

class ContentLocation:
    LOCAL = 'local'
    HOSTED = 'hosted'
    INACCESSIBLE = 'n/a'

class ContentIncludeMode:
    STRICT = 'strict'
    ALWAYS = 'always'
    NEVER = 'never'

Storage Modes

class PersistentStoreMode:
    AUTO = 'auto'
    FLUSH = 'flush'
    MEMORY = 'memory'

Exceptions

class AppriseException(Exception):
    """Base exception for all Apprise errors"""

class ApprisePluginException(AppriseException):
    """Raised for plugin-specific errors"""

class AppriseDiskIOError(AppriseException):
    """Raised for disk I/O related errors"""

class AppriseInvalidData(AppriseException):
    """Raised when invalid data is encountered"""

class AppriseFileNotFound(AppriseDiskIOError, FileNotFoundError):
    """Raised when a file cannot be found or accessed"""