from invoke import task @task def deploy(c): ... @task def run(c): c.run("python main.py")