Registry / communication / apprise

apprise

JSON →
library1.13.0pypypi✓ verified 25d ago

Apprise is a Python library that provides a common, simple interface for sending push notifications to almost any platform. It supports a vast array of services, including Slack, Discord, email, SMS, Telegram, and many more, allowing developers to integrate notifications without platform-specific code. It maintains an active development pace with several releases per year, continuously adding new services and improving existing ones. The current version is 1.9.9.

pip install apprise
INSTALL
IMPORT
SIG · APPRISE
A
apprise
communicationpythonv1.13.0
Install
3.2s avg
Import
954ms
Disk
34MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.13.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.963s · 34.5MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.2s · import 0.944s · 36MB
34MB installed
● package 34MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Apprise
from apprise import Apprise
import apprise; apobj = apprise.Apprise()
While 'import apprise' works, importing Apprise directly is idiomatic and clearer.
AppriseAsset
from apprise import AppriseAsset

This quickstart demonstrates how to initialize Apprise, add a notification service URL, and send a basic notification. It also shows how to include a dummy URL for testing output to stdout. For real services, replace `APPRISE_SLACK_URL` with your actual service URL, retrieved from environment variables for security. Remember to install extra dependencies if your chosen service requires them.

import apprise import os # Create an Apprise instance apobj = apprise.Apprise() # Add a service URL. # Use a real service URL or a dummy one like 'pypi://' for stdout output. # Example for Slack: 'slack://tokenA/tokenB/tokenC' # Example for Telegram: 'tgram://bottoken/chatid' # Replace with your actual URL. Using os.environ.get for security. slack_url = os.environ.get('APPRISE_SLACK_URL', 'pypi://') apobj.add(slack_url) # Send a notification apobj.notify( body='Hello from Apprise!', title='Apprise Quickstart', notify_type='info' # info, success, warning, failure ) print(f"Notification sent (or printed to stdout if using pypi://): {slack_url}") # Example with a file attachment (requires AppriseAsset and a valid service) # from apprise import AppriseAsset # try: # with open('example.txt', 'w') as f: # f.write('This is an example attachment.') # apobj.add('mailto://user@example.com') # Example service supporting attachments # apobj.notify( # body='Message with an attachment.', # attach=AppriseAsset('example.txt') # ) # except IOError: # mailto will silently fail without a server # print("Could not create example.txt or send attachment.")
apprise --version
Debug
Known issues
breakingVersion 1.9.4 introduced a major code refactor for Python 3.9+ compatibility. While efforts were made to maintain backward compatibility, users running older Python versions (pre-3.9) might experience unexpected behavior or require adjustments to their code.
fix
Ensure your environment uses Python 3.9 or newer. Review your code for any reliance on internal APIs or behaviors that might have changed during the refactor.
affects: >=1.9.4
gotchaMany notification services have specific optional dependencies that are not installed by default with `pip install apprise`. Forgetting to install these can lead to runtime `ImportError` exceptions when trying to use certain services.
fix
Install Apprise with the specific extras needed for your services (e.g., `pip install 'apprise[slack,telegram]'`) or install all optional dependencies with `pip install 'apprise[all]'`.
affects: All
gotchaNotification service URLs are critical for Apprise functionality. Incorrectly formatted URLs, missing authentication tokens, or invalid endpoints are common sources of errors that can prevent notifications from being sent.
fix
Always refer to the official Apprise documentation (AppriseIt.com) for the correct URL syntax and required parameters for each service. Utilize environment variables or a secure configuration management system for sensitive credentials.
affects: All
gotchaThe `Apprise` object is designed to be initialized once and reused throughout your application's lifecycle. Repeatedly creating new `Apprise` instances (e.g., inside a loop or for every notification) can lead to unnecessary overhead and inefficient resource usage.
fix
Initialize `Apprise` once, typically at application startup, and reuse the `apobj` instance for all subsequent notifications. Call `apobj.add()` for each unique service URL.
affects: All
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'apprise'
The 'apprise' module is not installed in the Python environment.
fix
Install the module using pip: 'pip install apprise'.
AttributeError: module 'apprise' has no attribute 'Apprise'
Incorrect import statement; 'Apprise' is a class within the 'apprise' module.
fix
Use the correct import: 'from apprise import Apprise'.
TypeError: notify() missing 1 required positional argument: 'body'
The 'notify()' method requires at least the 'body' argument to be provided.
fix
Ensure to pass the 'body' argument: 'apobj.notify(body='Your message here')'.
ValueError: Invalid URL: 'mailto://user:pass@example.com'
The notification service URL is incorrectly formatted or contains invalid credentials.
fix
Verify and correct the URL format and credentials: 'apobj.add('mailto://user:pass@example.com')'.
RuntimeError: There is no current event loop in thread 'Thread-2'.
Attempting to use asynchronous methods without an active event loop.
fix
Ensure an event loop is running: 'import asyncio; asyncio.run(main())'.
Upgrade
Version history
1.13.0latest on PyPI · released Aug 20, 2026
Audit
Dependencies
requestsrequiredCore dependency for HTTP communication with notification services.
lxmloptionalOptional: For HTML parsing capabilities.
markdownoptionalOptional: For Markdown rendering.
html2textoptionalOptional: For converting HTML to plain text.
pillowoptionalOptional: For image resizing and manipulation, used by some services.
pyyamloptionalOptional: For loading Apprise configuration from YAML files.
Agent activity
53 hits · last 30 days
node
46
OpenAI (training)
1
Resources
apprise — pip install apprise · libregistry