Skip to main content

Multi-backend notification system for SciTeX

Project description

SciTeX Notification (scitex-notification)

SciTeX

Multi-backend notification system for scientific workflows

PyPI version Documentation Tests License: AGPL-3.0

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 scitex already 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

Full API reference

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

Full CLI reference

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

Full MCP specification

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

  1. The freedom to run your research anywhere — your machine, your terms.
  2. The freedom to study how every step works — from raw data to final manuscript.
  3. The freedom to redistribute your workflows, not just your papers.
  4. 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.


SciTeX

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

scitex_notification-0.1.0.tar.gz (41.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scitex_notification-0.1.0-py3-none-any.whl (41.5 kB view details)

Uploaded Python 3

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

Hashes for scitex_notification-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f6bd77901616fffddf2d46850ce959e0719a132da4aeaa2d4d0aac74a768b76b
MD5 fba4490e3f251e6152d8661c5be1826f
BLAKE2b-256 249ef5b619df08e4b18e42ff3c41664efa06202f79e3a39782ce8bfd0674e687

See more details on using hashes here.

File details

Details for the file scitex_notification-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for scitex_notification-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e7314f8be6db32f64b38154d9ee20d87b925379aa12776499cc4ba2249f55f5
MD5 fc53b8df24999f2e44fb55d7a720e279
BLAKE2b-256 465ad9566239c42ab0bafbd7812ce1c3184853533db75e1f4525d19e8baf13f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page