Why?

Pipetools attempt to simplify function composition and make it more readable.

Why piping instead of regular composition?

I believe it to be easier to read, write and think about from left to right /
top to bottom in the order that it’s actually executed, instead of reversed
order as it is with regular function composition ((f • g)(x) == f(g(x))).

Example

Say you want to create a list of python files in a given directory, ordered by
filename length, as a string, each file on one line and also with line numbers:

OK, but what about the ugly lambda?

where(), but also foreach(),
sort_by() and other pipe-utils can be
quite useful, but require a function as an argument, which can either be a named
function – which is OK if it does something complicated – but often it’s
something simple, so it’s appropriate to use a lambda. Except Python’s
lambdas are quite verbose for simple tasks and the code gets cluttered…