You want to have an extremely good reason to use a Python API over a CLI / process. Pants caching is built around processes and tight control of side effects.
It can be the case that an API defeats that.
And in some sense you're getting lucky if not. After all, if the API was jvm, out of luck and you'd be forced to use a process.
01/25/2023, 4:41 AM
I am not able to follow.
AFAIK, Pulumi CLI is a go binary. For python projects, CLI runs the python code to get the configuration, which is then applied to infra by the go binary.
With the Python API, the CLI is still needed. But instead of the execution being controlled by shell, its happens via python. I don’t know how it works exactly, never dived into it deeply. I could be very wrong as well :)
Can there be issues if I have a python program execution subprocesses and Pants?