From d4fec000f71b7e546677b0b6ebe466772f164141 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Thu, 12 Dec 2024 13:58:26 +0400 Subject: [PATCH 1/2] Recommend stack Elasticsearch Python client --- .../clients-python-getting-started.asciidoc | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/serverless/pages/clients-python-getting-started.asciidoc b/serverless/pages/clients-python-getting-started.asciidoc index 8f12342d11..a492bf4619 100644 --- a/serverless/pages/clients-python-getting-started.asciidoc +++ b/serverless/pages/clients-python-getting-started.asciidoc @@ -4,20 +4,24 @@ // :description: Set up and use the Python client for {es3}. // :keywords: serverless, elasticsearch, python, how to +This page guides you through the installation process of the Python +client, shows you how to initialize the client, and how to perform basic +{es} operations with it. + +See the +https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/index.html[Python +client] documentation for more detailed usage instructions. + [NOTE] ==== -This client is for use with {es-serverless} only. See also the https://www.elastic.co/guide/en/elasticsearch/client/index.html[{es} clients]. +The same client is used for {es3}, on-premise and managed Elasticsearch. Some API endpoints are however not available in {es3}. ==== -This page guides you through the installation process of the Python -client for {es3}, shows you how to initialize the client, and how to perform basic -{es} operations with it. - [discrete] [[elasticsearch-python-client-getting-started-requirements]] == Requirements -* Python 3.7 or higher +* Python 3.9 or higher * https://pip.pypa.io/en/stable/[`pip`] [discrete] @@ -39,7 +43,7 @@ commands: [source,bash] ---- -python -m pip install elasticsearch-serverless +python -m pip install elasticsearch ---- [discrete] @@ -50,7 +54,7 @@ Initialize the client using your API key and {es} endpoint: [source,python] ---- -from elasticsearch_serverless import Elasticsearch +from elasticsearch import Elasticsearch client = Elasticsearch( "https://...", # Your project's Elasticsearch endpoint From f31146788268bcc6ae23c9ea178c82e0388de913 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Thu, 12 Dec 2024 15:05:17 +0400 Subject: [PATCH 2/2] Fix page title --- serverless/pages/clients-python-getting-started.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serverless/pages/clients-python-getting-started.asciidoc b/serverless/pages/clients-python-getting-started.asciidoc index a492bf4619..803ce00403 100644 --- a/serverless/pages/clients-python-getting-started.asciidoc +++ b/serverless/pages/clients-python-getting-started.asciidoc @@ -1,5 +1,5 @@ [[elasticsearch-python-client-getting-started]] -= Get started with the serverless Python client += Get started with the Elasticsearch Python client // :description: Set up and use the Python client for {es3}. // :keywords: serverless, elasticsearch, python, how to