JupyterHub service to expose notifications for Jupyter
Project description
SwanNotificationsService
JupyterHub service that exposes an API with notifications for the logged in user. The notifications are specified in a json file. If a "maintenance file" exists, a notification will be given that the service is under maintenance.
This extension works in conjunction with SwanNotifications.
Requirements
This module requires and installs JupyterHub.
Installation
Install the package:
pip install swannotificationsservice
Usage
Call the binary and specify configuration parameters:
swannotificationsservice --notifications_file /srv/jupyterhub/notifications.json
Configuration parameters:
- port (default: 8888)
- notifications_file (default: /srv/jupyterhub/notifications.json)
- maintenance_file (default: /etc/nologin)
- prefix (default: /)
Notifications file example:
[
{
"user": "*",
"id": "notif1",
"level": "info",
"dismissible": 0,
"message": "This is a notification"
}
]
Explanation:
- user: username or '*' for all users;
- id: unique identifier;
- level: type of the notification (notice, info, success, or error)
- dismissible: wether the user will be able to permanently hide the notification (0 or 1)
- message: the text/html message
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
Close
Hashes for swannotificationsservice-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9546bfe312eb7cc4da1d1ac9dda5e2599fe110a2555637d89a9e2013d196afc |
|
MD5 | 39d30cb72fe1ca8b0e55e5962ed5aa5f |
|
BLAKE2b-256 | 3160b8bc5800daf7864d92de8d19f56b7165b9f3f8fb235921d25821e0a2dd10 |
Close
Hashes for swannotificationsservice-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 248b738ebf87cf47e6af5eb7c7cadab71c3e679cb583adb9d75123e8b4569a74 |
|
MD5 | 0fc21e98409e66bbdccbc87f2c9187a2 |
|
BLAKE2b-256 | e4cc9b635d2968e25418a15d85836861554c31cbfca016247d9b793026b95dff |