Skip to content

Commit

Permalink
Recommend stack Elasticsearch Python client (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin authored Dec 12, 2024
1 parent 6ffa349 commit ce304c9
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions serverless/pages/clients-python-getting-started.asciidoc
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
[[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

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]
Expand All @@ -39,7 +43,7 @@ commands:

[source,bash]
----
python -m pip install elasticsearch-serverless
python -m pip install elasticsearch
----

[discrete]
Expand All @@ -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
Expand Down

0 comments on commit ce304c9

Please sign in to comment.