A package to monitor a process and send email notifications
Project description
Process Monitoring Package (Work in Progress ...)
The Process Monitoring package provides functionality to monitor a process by its PID and send email notifications when the process completes.
HOMEPAGE: https://github.com/ChengranAA/Process_Monitor_Python
Installation
You can install the package using pip:
pip install process-monitoring-package
Usage
Show PID
To display the PID (Process ID) of the current script, use the show_pid function:
from process_monitoring.show_pid import show_pid
show_pid()
This will print the PID of the current script to the console.
Monitor Process
To monitor a specific process by its PID and receive email notifications when it is completed, use the monitor_process function:
from process_monitoring.monitor import monitor_process
pid = 1234 # Replace with the PID of the process you want to monitor
sender_email = "your_email@gmail.com"
receiver_email = "recipient_email@gmail.com"
password = "your_email_password"
monitor_process(pid, sender_email, receiver_email, password)
Replace pid with the PID of the process you want to monitor. Provide the necessary email configuration, including the sender's email, receiver's email, and email password. This function will continuously check if the process is running. When the process is completed, an email notification will be sent.
I recommend creating a separate Gmail email account and utilizing an app-specific password for this package, as it operates through the Gmail server. To access this option, navigate to the security settings within your Gmail account.
see this video for details: https://www.youtube.com/watch?v=Sddnn6dpqk0&t=548s
Contributing
Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the GitHub repository.
License
This package is licensed under the MIT License. See the LICENSE file for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file process_monitoring_package-0.0.3.tar.gz.
File metadata
- Download URL: process_monitoring_package-0.0.3.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7aa6d5eb8ac4fe76b286290b0f317286c59a13cf1bdbf1aa02c774c7b0db729
|
|
| MD5 |
f52f87a07b9d789425998518a22e5f9b
|
|
| BLAKE2b-256 |
66e9e12b03822cb94078312d64d39a058bd1514db696ab1fcec1fcf59913cb8a
|
File details
Details for the file process_monitoring_package-0.0.3-py3-none-any.whl.
File metadata
- Download URL: process_monitoring_package-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
950f902463dd5fd97ef7b0a6a1bfaeb3216412c3a41f36e386e035e4f6b8dc62
|
|
| MD5 |
9bf1dfd0604fa63a8a3fda216d11f8b9
|
|
| BLAKE2b-256 |
b79950735cc4afbbd9c7e7e0f65997d5642ca508285cd24901ff6ded8f6a5c51
|