Skip to main content

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.

Email

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

process_monitoring_package-0.0.3.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

process_monitoring_package-0.0.3-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file process_monitoring_package-0.0.3.tar.gz.

File metadata

File hashes

Hashes for process_monitoring_package-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c7aa6d5eb8ac4fe76b286290b0f317286c59a13cf1bdbf1aa02c774c7b0db729
MD5 f52f87a07b9d789425998518a22e5f9b
BLAKE2b-256 66e9e12b03822cb94078312d64d39a058bd1514db696ab1fcec1fcf59913cb8a

See more details on using hashes here.

File details

Details for the file process_monitoring_package-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for process_monitoring_package-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 950f902463dd5fd97ef7b0a6a1bfaeb3216412c3a41f36e386e035e4f6b8dc62
MD5 9bf1dfd0604fa63a8a3fda216d11f8b9
BLAKE2b-256 b79950735cc4afbbd9c7e7e0f65997d5642ca508285cd24901ff6ded8f6a5c51

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