Skip to main content

ProcessGuard Library

The ProcessGuard library provides a set of functions to manage, monitor, and guard processes on your system.

Table of Contents

Installation

To install the ProcessGuard library, you can use pip:

pip install ProcessGuard

Usage

Import the functions you need from ProcessGuard in your Python script:

from ProcessGuard import *

# Use the functions from the library
# ...
  1. Check if Notepad is running:

    if is_running("notepad.exe"):
        print("Notepad is running.")
    else:
        print("Notepad is not running.")
    
  2. Start a process with arguments (Notepad with a text file):

    start_with_arguments("notepad.exe", ["path/to/textfile.txt"])
    
  3. Monitor a process:

    monitored_process = "chrome.exe"
    monitor_process(monitored_process, interval=10)
    
  4. "Run Always" for a process:

    process_name = "notepad.exe"
    process_path = r"C:\Windows\System32\notepad.exe"
    guard(process_name, process_path, True, 0.1)
    

Functions

  • is_running(process_name): Check if a process is currently running.
  • start(process_path): Start a process.
  • terminate(process_name): Terminate a process.
  • guard(process_name, process_path, closetaskmanager, interval): Guard and monitor a process.
  • list_running(): List all currently running processes.
  • get_memory_usage(process_name): Get memory usage of a process.
  • get_cpu_usage(process_name): Get CPU usage of a process.
  • kill_all(process_name): Terminate all instances of a process.
  • restart(process_name, process_path): Restart a process.
  • count_running(): Count the number of running processes.
  • get_process(process_name): Get details of a specific process.
  • monitor_process(process_name, interval): Monitor the status of a process.
  • start_with_arguments(process_path, arguments): Start a process with arguments.

For more examples, check the examples directory in this repository.

Contributing

Contributions to the ProcessGuard library are welcome! Feel free to fork the repository and submit pull requests.

License

This project is licensed under the MIT License.

GitHub Repository

Check out the GitHub repository for more information, documentation, and contributions.

Metadata

Release files for ProcessGuard 0.5.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ProcessGuard 0.5.5
File Size Uploaded Provenance Actions
ProcessGuard-0.5.5.tar.gz 2.3 kB Without provenance Details for ProcessGuard-0.5.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ProcessGuard 0.5.5
File Interpreter ABI Platform Actions
ProcessGuard-0.5.5-py3-none-any.whl Python 3 none any Details for ProcessGuard-0.5.5-py3-none-any.whl

Total release size: 4.4 kB

Release files / ProcessGuard-0.5.5.tar.gz

Download URL ProcessGuard-0.5.5.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5bcbbbb20333d51c63f53c19ed0b95298a0dcf881cb8a6352ea4a136dc4b3d92
BLAKE2b-256 checksum
How to use checksums
a583ec6e0c45ed19c0d2d69f62daa3ffabc56137d69452c36006eb7f2c93dd67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.10

Release files / ProcessGuard-0.5.5-py3-none-any.whl

Download URL ProcessGuard-0.5.5-py3-none-any.whl
Size 2.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
399e77a6a5a991a9d34f4898ed656c3578072497ffebe71a0ae427e8470108f7
BLAKE2b-256 checksum
How to use checksums
88aa63381f39716e5f927d4fe991bab037c2abded7b663341ac548f1d672e09c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.10

Security for ProcessGuard 0.5.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page