jupyterlab_notifications_extension 1.1.22 → 1.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +19 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -133,23 +133,34 @@ await app.commands.execute('jupyterlab-notifications:send', {
133
133
  The `jupyter-notify` command is installed with the extension:
134
134
 
135
135
  ```bash
136
- # Basic notification (localhost, no auth needed)
136
+ # Local mode (default) - adds directly to notification store
137
137
  jupyter-notify -m "Deployment complete" -t success
138
+ # Output: Mode: Local | Type: success
139
+ # Notification queued: notif_1765552888047_0
138
140
 
139
- # Persistent warning (no auto-close)
140
- jupyter-notify -m "System maintenance in 1 hour" -t warning --no-auto-close
141
+ # API mode - auto-detects URL from environment
142
+ jupyter-notify --use-api -m "Build finished"
143
+ # Output: Mode: API | URL: http://127.0.0.1:8888/jupyterhub/user/alice | Type: info
144
+ # Notification sent: notif_1765552893662_0
141
145
 
142
- # JupyterHub with base path
146
+ # API mode with explicit URL (--url implies --use-api)
143
147
  jupyter-notify --url "http://127.0.0.1:8888/jupyterhub/user/alice" -m "Hello"
144
148
 
149
+ # Persistent warning (no auto-close)
150
+ jupyter-notify -m "System maintenance in 1 hour" -t warning --no-auto-close
151
+
145
152
  # Silent mode (notification center only, no toast)
146
153
  jupyter-notify -m "Background task finished" --auto-close 0
147
-
148
- # With dismiss button
149
- jupyter-notify -m "Action required" -t warning --no-auto-close --action "Dismiss"
150
154
  ```
151
155
 
152
- Auto-detects tokens from `JUPYTERHUB_API_TOKEN`, `JPY_API_TOKEN`, or `JUPYTER_TOKEN` for remote servers.
156
+ **Modes**:
157
+ - **Local** (default): Adds notifications directly to the in-memory store. Works when running in the same Python environment as JupyterLab (e.g., from a notebook terminal)
158
+ - **API** (`--use-api` or `--url`): Sends via HTTP. Use for remote servers or when running outside JupyterLab's process
159
+
160
+ **Environment variables** (for API mode URL auto-detection):
161
+ - `JUPYTER_SERVER_URL` - explicit server URL
162
+ - `JUPYTERHUB_SERVICE_PREFIX` - JupyterHub user path (e.g., `/jupyterhub/user/alice`)
163
+ - `JUPYTER_PORT` - server port (default: 8888)
153
164
 
154
165
  ### cURL
155
166
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jupyterlab_notifications_extension",
3
- "version": "1.1.22",
3
+ "version": "1.1.23",
4
4
  "description": "Jupyterlab extension to receive and display notifications in the main panel. Those can be from the jupyterjub administrator or from other places.",
5
5
  "keywords": [
6
6
  "jupyter",