cd demo/cpu_job
# one remote call, then map() over six inputs (one container each, results stream back)
python app.py
# deploy it as an HTTP function named is-prime
levers9 deploy app.py:is_prime --name is-prime
TOKEN=$(awk -F' = ' '/^\[default\]/{f=1} f&&/^token/{print $2; exit}' ~/.levers9/config)
curl -s -X POST localhost:1994/job/is-prime/v1 \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"n": 7919}'
# {"n": 7919, "prime": true, "host": "...", "pid": ...}
# debug inside the same blueprint
levers9 shell app.py:is_prime