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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pynotify_auto-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 d258e18c0375e91f786d5068beb9e995f751556110c3bfb31214f14e22660831
MD5 2e1b52e60c34764b855c2e296c0c3bf3
BLAKE2b-256 c9f3100fae6b053fe1fbaed01e1917ab8bdd1a29005136ad768fc863930ee9ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pynotify_auto-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 254e631edcfc72aa2d62aaacb60d2ec20c26dfba3d44c5a9b9db2e6db48aa8da
MD5 1fc74530c733398d8a1efbe4a8b0cb48
BLAKE2b-256 82cbac331368d86ed1802064ef82ac02044889c88ff5bd98cf2fbdf36a9b8446

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