app.py内の関数f()だけを呼びたいならこうかね
python -c 'import app;res=app.f(1,2,3);print("result:%d" % res)'