In the quick start documentation page here: https://elasticsearch-py.readthedocs.io/en/v8.17.1/quickstart.html there's only the Cloud example, which is fine.
I think provide an example about non-cloud instances with one line may be helpful, like in this other page: https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html .
To be fair there's some hint about direct connection in this notebook, but it is yet another way to do it.
(Another small note is why are there multiple ways to do the same thing? Which one is the preferred one?).