Skip to main content

A simple task runner

Project description


A simple task runner

Make and Bash are useful tools but the syntax can be tricky, especially if you're writing Bash inside a Makefile. And sometimes you need the flexibility and expressivity of a proper programming language with a standard library.

If you know Ruby, you're probably already familiar with Rake; and for Python there's Invoke. But maybe you don't want to invest time in learning a new tool and its idiosyncracies.

Yatte is for when you just want to write a Python script and get back to work.

Project links


Install the package:

pip install yatte

Create a file named containing some functions decorated with @task:

from subprocess import run
from sys import exit, stderr

from yatte import task

def hello():
    """Greet the world"""
    print("Hello, world!")

def list_files(dir):
    """List the files in the directory"""
    shell(f"ls {dir}")

def shell(cmd):
    print("sh>", cmd, file=stderr)
    p = run(cmd, shell=True)
    if p.returncode:

Then call yatte by itself to list the tasks:

$ yatte
greet                   Greet the world
list-files dir          List the files in the directory

And yatte {task} to execute the given task:

$ yatte list-files .
sh> ls .

See the docs for more details.

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

yatte-0.9.0.tar.gz (15.6 kB view hashes)

Uploaded source

Built Distribution

yatte-0.9.0-py2.py3-none-any.whl (7.9 kB view hashes)

Uploaded py2 py3

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