Skip to main content

Python3 OS commands run dependency planner

Project description

CmdPlan

CmdPlan will help you plan launch of the system commands. Just define target node name and script will search it at described nodes dictionary, but it will launch their dependencies at first.

Requires

Python3

Install

$ pip install cmd-plan

Usage

Example:

import cmd_plan

NODES = {
    'TEST': {
        'command': 'python3 manage.py runserver 127.0.0.1:8000',
    },
    'TEST_WITH_NOHUP': {
        'command': 'nohup python3 manage.py runserver 127.0.0.1:8000 >/dev/null 2>&1 &',
    },
    'SERVER_SIDE': {
        'command': './server.sh &',
    },
    'CLIENT_SIDE': {
        'command': 'python3 ./client.py',
        'dependencies': ['SERVER_SIDE', ],
    }
}

# Example 1
cmd_plan.launch('TEST', NODES)  # Run Django debug WEB-server

# Example 2
cmd_plan.launch('CLIENT_SIDE', NODES)  # Run some `client`, but run it `server` at first 

License

From Russia with love.

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

cmd_plan-1.0.4.tar.gz (1.8 kB view hashes)

Uploaded Source

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