I have built something similar, coming at the problem from a different direction. I wanted a Unix-style shell, but piping objects instead of strings. For example, to sum x^2 from the command line, x = 0-9:
bash$ osh gen 10 ^ f 'x: x**2' ^ red + $
^ is the pipe symbol, red means "reduce", $ means output, and f means apply the given function.The same capabilities are available as a Python library:
from osh.api import *
osh(gen(10), f(lambda x: x**2), red(lambda x, y: x + y), out())
or from osh.api import *
osh(gen(10), f(lambda x: x**2), red('+'), out())
Osh can also run results on multiple hosts at once, in parallel, combining the results in various ways; and integrates database access, piping tuples to and from sql commands.