I find it hard to trust a tutorial that tells me forking curl is an exemplary way to interact with a local restful API in Python.
It's very easy to port it to Python requests or a similar HTTP library, at the least.
I agree that since Ollama provides a nice REST API, why not use that.