Skip to main content

A simple program to automatically kill running process(es) and re-spawn new process(es) for the runnable files everytime some specified file(s) get modified (or deleted or created). For example, Automatically re-starting any server when the server file(s) is modified.

Project description

autoReRun v1.2.1

pip install autoReRun --upgrade


A simple program to automatically kill running process(es) and re-spawn new process(es) for the runnable files everytime some specified file(s) get modified (or deleted or created). For example, Automatically re-starting any server when the server file(s) is modified.


To install:

pip install autoReRun --upgrade
pip3 install autoReRun --upgrade
python -m pip install autoReRun --upgrade
python3 -m pip install autoReRun --upgrade



Using this program is as simple as:

from autoReRun import Runner as updateRunner

toRun = {
    "server1.py":["-p 5000", "-h 0.0.0.0"], # file A to run
    "server2.py":["-p 6000"], # file B to run
         }
         
toCheck = [
    "server1.toml",  # file X to check for updates
    "server2.toml" # file Y to check for updates
           ]
           
# start the process
updateRunner(toRun=toRun, toCheck=toCheck).start() 

Future implementations:

  • Only limited to python files, make it work with any other file type.
  • Way to turn off debugger.

This project is always open to suggestions and feature requests.

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

autorerun-1.2.1.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

autoReRun-1.2.1-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page