Skip to main content

Zero-Code automatic notifications for long-running Python scripts.

Project description

pynotify-auto 🚀

Zero-Code automatic notifications for long-running Python scripts.

Tired of checking your terminal every 5 minutes to see if your script finished? pynotify-auto automatically pings you (with a sound and a system notification) when any Python script runs for more than 5 seconds.

No code changes required. Just install and forget.

Features

  • Zero-Code Integration: Works automatically across your entire system/environment.
  • Smart Thresholding: Only pings if the script ran for a meaningful amount of time (default > 5s).
  • Cross-Platform: Works on Windows, macOS, and Linux.
  • Configurable: Change the threshold or disable it via environment variables.

Installation

Via Pip

pip install .

Via Conda

(Once uploaded to a channel or built)

conda install -c your-channel pynotify-auto

How it Works

The library uses a Python Path Configuration file (.pth) to register an atexit hook during Python startup. This allows it to monitor the execution time of any script without you having to import anything manually.

Configuration

You can customize the behavior using environment variables:

  • PYNOTIFY_MODE: Notification type. Options: popup (default), sound.
  • PYNOTIFY_THRESHOLD: Minimum execution time in seconds (default: 5.0).
  • PYNOTIFY_DISABLE: Set to 1 to disable notifications for a specific run.

Examples

# Only get a sound notification (no popup)
export PYNOTIFY_MODE=sound
python training.py

# Only notify if script takes longer than 10 minutes
export PYNOTIFY_THRESHOLD=600
python long_process.py

Command Line Interface (CLI)

Once installed, you can use the pynotify-auto command to test your settings:

  • pynotify-auto --test: Trigger a test notification.
  • pynotify-auto --info: View current mode and threshold settings.
  • pynotify-auto --help: Show all available commands.

License

MIT

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

pynotify_auto-0.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

pynotify_auto-0.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file pynotify_auto-0.1.0.tar.gz.

File metadata

  • Download URL: pynotify_auto-0.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pynotify_auto-0.1.0.tar.gz
Algorithm Hash digest
SHA256 132001ccd87a75dcfa71753c8ba889ff47e64f4d6975a12c735961a154714fcc
MD5 ded987d592ccb7fbf637475b6aa9f50f
BLAKE2b-256 b923f083446597fb1d2c08c0bcbc50189a4137a29eb2b2df16bf697739aeb7e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pynotify_auto-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pynotify_auto-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3bc99059b8babbe5fbd26cd82d537101a5ae572f144d2ca8300b42ed95b8496f
MD5 106adb0fb5acb03abff3ced53f3d2c62
BLAKE2b-256 5cc0ea15c39e2bd4221b993ef32e5f43455d5335765f3b422c706c1084187353

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