I've just discovered this: https://www.tutorialspoint.com/saltstack/saltstack_python_api.htm In salt master, on Ubuntu, import salt.<whatever> is already available. And you can python it live!