Auto Notifier (Desktop MVP)
Easily notify yourself of task completion or failure in Python scripts with Auto Notifier. Ideal for monitoring long-running jobs or automating workflows. Delivers native desktop notifications using notify-py; future support for other channels is planned.
Install from PyPI (or a local source distribution) and the required
notify-py dependency will be pulled in automatically:
pip install auto-notifier
Alternatively, you can include the auto_notifier directory in your
project and add it to your PYTHONPATH; in that case you must ensure
notify-py is available in the runtime environment.
Usage
Decorator
Use the notify_when_done decorator to wrap a long-running function.
When the function returns successfully, a desktop notification will be
sent indicating completion and the elapsed time. If the function
raises an exception, a failure notification will be sent instead and
the exception will be re-raised.
from auto_notifier import notify_when_done
@notify_when_done(
title="Training finished",
message="The model training completed successfully",
error_title="Training failed",
)
def train_model():
# long running code here
...
train_model() # will send a desktop notification when done or on error
Context manager
You can also wrap arbitrary code using the notify_on_complete
context manager:
from auto_notifier import notify_on_complete
with notify_on_complete(title="Processing done"):
# long running block here
...
When the block exits, a desktop notification is sent indicating success or failure.
Configuration
Both the decorator and context manager accept optional keyword
arguments that are passed directly to notifypy.Notify (for
example, app_name or icon_path). Refer to the
notify-py documentation for
details. A minimal example from the upstream library shows how to
instantiate the notifier and send a message:
from notifypy import Notify
notification = Notify()
notification.title = "Cool Title"
notification.message = "Even cooler message."
notification.send() # sends a desktop notification on your platform
This library uses the same API under the hood.
Limitations
- This version only supports desktop notifications via
notify-py. To receive notifications over other channels (Slack, email, etc.), additional integrations will need to be implemented in future versions. - Desktop notifications may not display on headless servers or
restricted environments. In such cases, you may wish to extend
the
send_notificationfunction to log messages or use another backend.
Metadata
Release files for auto-notifier 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| auto_notifier-0.1.0.tar.gz | 2.9 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| auto_notifier-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.9 MB
Release files / auto_notifier-0.1.0.tar.gz
| Download URL | auto_notifier-0.1.0.tar.gz |
|---|---|
| Size | 2.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df4bfa06b61aa1a3f84561d96b339022a9f7aee5127e54e47c4bf03ab21406af
|
|
BLAKE2b-256 checksum How to use checksums |
8aaf8a6d4c951f6423a95aa585d291ace8296aa83c79ac721917aced03011308
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / auto_notifier-0.1.0-py3-none-any.whl
| Download URL | auto_notifier-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7931f1b3eec9b5248219dc40b03388a5b16535d1ae3a566687124f2afbd5bcfd
|
|
BLAKE2b-256 checksum How to use checksums |
b117218169c1dbbc271fe7d6a31dae3a4461c00f2935503072c33a5f4badc180
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|