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 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.2.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.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pynotify_auto-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 65f0a4fabca029243f6da009141d48d5f03ef5aa482ab9b3682072bbe62ebabc
MD5 69c5950002b05a805817d0bbfc22db09
BLAKE2b-256 a3b9dcf74394dbd3880bb1c9dcde58c1fcfec54eb184574ed9e2cd43593cda30

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pynotify_auto-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 afa0c248c6eb4aa6d79390c8736a3821967b134dec0f717fe68e3a580abde559
MD5 9e68c7b7df134ffdbac174a6c4f61012
BLAKE2b-256 55e097578ae980f90cfa552e424d0a21036b1fbea6c7260cea8a504c89f58af3

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