Multi-backend notification system for SciTeX
Project description
SciTeX Notification (scitex-notification)
Multi-backend notification system for scientific workflows
Full Documentation · pip install scitex-notification
Problem
Long-running scientific computations — model training, HPC jobs, large-scale analyses — complete while researchers are away from their desks. Researchers either poll their terminals continuously, or miss results entirely and come back hours later to a finished (or failed) job. There is no standard, composable way to route completion alerts across the varied backends researchers actually use: audio, SMS, email, or custom webhooks.
Solution
SciTeX Notification provides a unified notify interface that routes completion alerts and status messages across multiple backends — audio alerts, SMS via Twilio, email via SMTP, and generic webhooks — with a single function call.
Named after the core problem it solves — knowing when something is done — it lets you:
- Alert yourself when a job finishes, regardless of where you are
- Route notifications to the right backend based on environment and urgency
- Compose multiple backends so critical alerts reach you through redundant channels
- Integrate with SciTeX sessions for automatic job completion notifications
Installation
Requires Python >= 3.10.
pip install scitex-notification
Install with optional backends:
pip install "scitex-notification[audio]" # audio alerts via scitex-audio
pip install "scitex-notification[twilio]" # SMS via Twilio
pip install "scitex-notification[mcp]" # MCP server for AI agents
pip install "scitex-notification[all]" # everything
SciTeX users:
pip install scitexalready includes Notification. Alerts are automatic via@scitex.session.
Quickstart
import scitex_notification as stxn
# Alert via default backend (audio → emacs → email fallback)
stxn.alert("Training complete. Val loss: 0.042")
# Alert via a specific backend
stxn.alert("Job finished", backend="email")
# Alert via multiple backends
stxn.alert("Critical failure", backend=["sms", "email"])
# Make a phone call via Twilio
stxn.call("Critical alert!")
# Send an SMS via Twilio
stxn.sms("Build done!")
Configure backends via environment variables (see .env.example):
export SCITEX_NOTIFY_DEFAULT_BACKEND=audio
export SCITEX_NOTIFY_TWILIO_SID=ACxxxxxxx
export SCITEX_NOTIFY_TWILIO_TOKEN=...
export SCITEX_NOTIFY_TWILIO_TO=+1234567890
Three Interfaces
Python API
import scitex_notification as stxn
stxn.alert("Job done") # default backend (with fallback)
stxn.alert("Error", backend="email") # specific backend
stxn.alert("Critical", backend=["sms", "email"]) # multiple backends
stxn.call("Urgent!") # phone call via Twilio
stxn.sms("Build done!") # SMS via Twilio
stxn.available_backends() # list installed backends
CLI Commands
scitex-notification --help # Show all commands
scitex-notification send "Job done" # Send via default backend
scitex-notification send "Done" --backend email # Send via specific backend
scitex-notification status # Show configuration
scitex-notification backends # List available backends
scitex-notification mcp list-tools # List MCP tools
MCP Server — for AI Agents
AI agents can send notifications and check system status autonomously.
| Tool | Description |
|---|---|
notify_handler |
Send an alert via specified or fallback backends |
notify_by_level_handler |
Send alert using level-based backend config |
list_backends_handler |
List all backends with availability status |
get_config_handler |
Show current notification configuration |
scitex-notification mcp start
SSH Audio Relay
When running jobs on a remote server, audio alerts can play on your local speakers via scitex-audio's SSH relay — no extra configuration needed on the notification side.
pip install "scitex-notification[audio]"
Part of SciTeX
SciTeX Notification is part of SciTeX.
The SciTeX system follows the Four Freedoms for Research below, inspired by the Free Software Definition:
Four Freedoms for Research
- The freedom to run your research anywhere — your machine, your terms.
- The freedom to study how every step works — from raw data to final manuscript.
- The freedom to redistribute your workflows, not just your papers.
- The freedom to modify any module and share improvements with the community.
AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.
Project details
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 scitex_notification-0.1.0.tar.gz.
File metadata
- Download URL: scitex_notification-0.1.0.tar.gz
- Upload date:
- Size: 41.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6bd77901616fffddf2d46850ce959e0719a132da4aeaa2d4d0aac74a768b76b
|
|
| MD5 |
fba4490e3f251e6152d8661c5be1826f
|
|
| BLAKE2b-256 |
249ef5b619df08e4b18e42ff3c41664efa06202f79e3a39782ce8bfd0674e687
|
File details
Details for the file scitex_notification-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scitex_notification-0.1.0-py3-none-any.whl
- Upload date:
- Size: 41.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e7314f8be6db32f64b38154d9ee20d87b925379aa12776499cc4ba2249f55f5
|
|
| MD5 |
fc53b8df24999f2e44fb55d7a720e279
|
|
| BLAKE2b-256 |
465ad9566239c42ab0bafbd7812ce1c3184853533db75e1f4525d19e8baf13f6
|