Skip to main content

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

Project description

pynotify-auto

PyPI version Build Status License: MIT Python Versions

Zero-Code automatic notifications for any long-running Python script.

Stop babysitting your terminal. Whether you're training models, processing datasets, or running complex simulations, pynotify-auto pings you the moment your task is done—so you can focus on what matters.

Why use this?

Traditional notification libraries require you to manually add decorators or extra lines of code to every script. pynotify-auto is different: it works automatically for every script in your environment.

  • No Code Changes: Install once, and it works for all your scripts.
  • Smart Filtering: It stays quiet for quick tasks and only alerts you for the ones that actually take time.
  • Immediate Feedback: Know exactly when your process finishes or fails, even if you're in another room.

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

[!IMPORTANT] Activation Step: Due to how modern Python environments (Conda, venv) handle installation, you may need to manually enable the zero-code hook once after installation:

pynotify-auto --enable

This ensures that pynotify-auto can monitor your scripts automatically. You can check the status at any time with pynotify-auto --info.

Examples

Using Environment Variables

You can customize the behavior on the fly without changing any code:

# 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

# Temporarily disable notifications for a specific run
PYNOTIFY_DISABLE=1 python quick_test.py

Using the Command Line (CLI)

Test your settings or check your configuration directly from the terminal:

# Trigger a test notification to see it in action
pynotify-auto --test

# Show your current settings (Mode, Threshold, Status)
pynotify-auto --info

License

MIT

Contributing

I'm open to contributions! Feel free to fork the repo and open a PR if you have bug fixes or new notification backends (Slack, Discord, etc.) you'd like to add.

Check the comprehensive test suite for examples on how to run tests locally.

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.3.1.tar.gz (9.8 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.3.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pynotify_auto-0.3.1.tar.gz
  • Upload date:
  • Size: 9.8 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.3.1.tar.gz
Algorithm Hash digest
SHA256 1836aaa0756e8a5d6816c19be914c8e85673bfe310fa68090cea305b197fa8e9
MD5 c860b385d1cb4a7e9a8d53ce9ddcc7db
BLAKE2b-256 051fa9bc6dd6b75b00d64b8a85a9c59f94714947c19ded570621c6baea8dfa68

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pynotify_auto-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 7.8 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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 333ac8f45ebbfd8e524efec431a64177b5a68403e691211adf2fee5d82e11815
MD5 98ffb781e119f6ade42dd1b73a52f2f4
BLAKE2b-256 5f5f756b18ae25a00e2e3f573b1f3dea239b837cbc1baabc89363bb845e56686

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