Skip to main content

Make shell scripts from python functions

Project description

Make a shell script from a python function. Generates an argument parser for the function using argparse by inspecting the function arguments.

#! /usr/bin/python
from simplescript import simplescript

@simplescript
def myscript(a_flag=False, a_string="default"):
    """An example script"""
    if a_flag:
        print a_string

Install using pip:

pip install simplescript

Supported by

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