Skip to main content

Manages processes

Project description

PMFlow

This is a simple process managing command line tool

This tools keeps the information of the processes it manages in a json file created at it's installation location

Installation

pip install pmflow

Windows Installation: After installing pmflow with pip on windows make sure the path where the pm script is in the environment variable.

Use the below command in cmd to see the installation location of the pmflow

pip show pmflow

It should be something like C:\your\installation\location\Python\Python3<version>\site-packages. In Python3<version> directory there should be a directory named scripts. Make sure the path C:\your\installation\location\Python\Python3<version>\scripts is a environment variable and you should be good to go.

Commands

<^> Main commands

create: Creates a new process

Required arguments:

  • command: str (default: None)

Optional arguments:

  • --name or -n : str (default: None)
  • --group or -g : str (default: process_id)
  • --relation or -r : "parent" | "child" (default: "parent")
  • --forground or -f: bool (default: false) Keeps the process alive. Useful in making .service.
  • --verbose or -v: (default: false) For extra information (currently not useful)

Note: A child process must have a group name and the group must have a parent process.

Example:

pm create "<command>"
or
pm create "<command>" -n "<process name>" -g "<group name>" -r "child"

ls: List all managed processes

Optional arguments:

  • --json or -j: bool (default: false)
  • --group or -g: str (default: None)
  • --running or -r: bool (default: false) Example:
pm ls
pm ls -j
pm ls -g <group_name>
pm ls -j -g <group_name>
pm ls -r 

kill: Kill process, kills the process and also removes it from the json file.

Optional arguments:

  • pid (no flag needed): int (default: 0) kills one process if it's a child process. Otherwise, kills the terminates
  • --group or -g: str (default: None) kills one group if exist
  • --child or -c: bool (default: False) kills all child process in a group
  • --all or -a : bool (default: false) kills all the process

Note: Other than -c only one options can be used at a time. -c flag must be used with -g

Example:

pm kill <PID>
pm kill -g <group_name>
pm kill -g <group_name> -c
pm kill -a

<^> Additional commands

Recreate all process managed by the tool:

pm recreate

Pause a process

pm pause <PID>

respawn all paused process

pm respawn

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

pmflow-1.2.16.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

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

pmflow-1.2.16-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file pmflow-1.2.16.tar.gz.

File metadata

  • Download URL: pmflow-1.2.16.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for pmflow-1.2.16.tar.gz
Algorithm Hash digest
SHA256 81edf1dba006a53591c919a675a12fcd603f158711095c4fc2d5d61a1511ebb8
MD5 3bd55d8a953dd3ec48db302ea46bbca6
BLAKE2b-256 b2f96c8d5d2a0acd1ad04a90ffe831e27bf8d82b5623795c37faf2bf1b55feef

See more details on using hashes here.

File details

Details for the file pmflow-1.2.16-py3-none-any.whl.

File metadata

  • Download URL: pmflow-1.2.16-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for pmflow-1.2.16-py3-none-any.whl
Algorithm Hash digest
SHA256 f876a6877eb403ab55bc46a8392bc66dcf27265a84c68c84f163fcc3b57be76d
MD5 df6da2571790cd9b32d73858827de794
BLAKE2b-256 76a4ef0f0077efec261c7efb6032831ccd2bbfda8660beba12fce48b67bbcd74

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