Persistent notification center with topbar bell, event bus integration, and optional Web Push
Project description
fastpluggy-notification-center
Persistent notification center for FastPluggy with topbar bell icon, event bus integration, pluggable delivery channels, and optional Web Push support.
Installation
pip install fastpluggy-notification-center
For Web Push support:
pip install fastpluggy-notification-center[push]
Features
- Topbar bell icon — unread badge count, slide-out notification panel
- Event bus integration — listens to all
notification.*events automatically - Pluggable channels — any plugin can register as a delivery channel via the
NotificationChannelprotocol - Channel relay — forward notifications to external channels (ntfy, email, etc.) based on category
- Web Push — browser push notifications via VAPID (auto-generates keys on first load)
- Notification categories —
info,success,warning,errorwith colored badges - Read/unread tracking — mark individual or bulk mark-as-read
- Auto-cleanup — configurable retention period (default 30 days)
Configuration
Settings are managed via NotificationCenterSettings (database-backed). Configure through the FastPluggy settings UI.
| Setting | Default | Description |
|---|---|---|
notification_retention_days |
30 |
Days to keep notifications before cleanup |
max_notifications_per_page |
50 |
Pagination size for notification list |
relay_enabled |
false |
Enable forwarding to delivery channels |
relay_channels |
[] |
Channel names to relay to (empty = all discovered) |
relay_categories |
["error"] |
Only relay notifications with these categories |
web_push_enabled |
true |
Enable browser Web Push support |
vapid_private_key |
"" |
VAPID private key (auto-generated if empty) |
vapid_public_key |
"" |
VAPID public key (auto-generated if empty) |
vapid_contact_email |
"" |
Contact email for VAPID identification |
Usage
Sending notifications via event bus
Any plugin can emit a notification event:
fast_pluggy.events.emit("notification.info", payload={
"title": "Task completed",
"message": "Backup finished successfully",
"category": "success",
"data": {"task_id": 42},
})
Sending browser push notifications
fast_pluggy.events.emit("notification.push", payload={
"title": "Deployment ready",
"message": "v1.2.0 is live",
"url": "/plugin/ecosystem_status/",
})
Explicit relay to all channels
Bypasses the category filter:
fast_pluggy.events.emit("notification.relay", payload={
"title": "Critical alert",
"message": "Database connection lost",
"category": "error",
})
Registering a delivery channel
Any plugin can act as a delivery channel by implementing the NotificationChannel protocol:
from fastpluggy_plugin.notification_center.channels import NotificationChannel
class MyChannel:
channel_name = "my_channel"
def send(self, title, message, category, data=None):
# deliver the notification
...
class MyPlugin(FastPluggyBaseModule):
notification_channel = MyChannel()
The notification center discovers channels automatically at startup.
Dashboard
The notification panel is accessible via the topbar bell icon on every page. A full notification history page is available at /plugin/notification_center/ (CI) or /plugin-pkg/notification_center/ (local dev).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastpluggy_notification_center-0.2.0.tar.gz.
File metadata
- Download URL: fastpluggy_notification_center-0.2.0.tar.gz
- Upload date:
- Size: 23.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f819b53a130170238aceb46a8e51436a80bb21b0f308ddd01b833b809b9bd59
|
|
| MD5 |
32d347598370f0e73449d65f98513b0a
|
|
| BLAKE2b-256 |
2e349828c57e76958a4fdfdc405bac9dd3ee38fcb024809e321b5f5489bc2c87
|
File details
Details for the file fastpluggy_notification_center-0.2.0-py3-none-any.whl.
File metadata
- Download URL: fastpluggy_notification_center-0.2.0-py3-none-any.whl
- Upload date:
- Size: 23.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d03e67f156284beed6ee1925151fc6a60eb70a9f7eee40d1069b2fa929e102b
|
|
| MD5 |
a2d89d8959e0225795a61146084d924b
|
|
| BLAKE2b-256 |
490ed33fcff232f16294258a92d2641477eef606283388a13e38d0e76a6d7e9f
|