Skip to content

Commit

Permalink
[Backport 8.8] [DOCS] Restructures repo readme (#2257)
Browse files Browse the repository at this point in the history
Co-authored-by: István Zoltán Szabó <[email protected]>
  • Loading branch information
github-actions[bot] and szabosteve authored Jul 19, 2023
1 parent ccca348 commit aad9fa7
Showing 1 changed file with 17 additions and 39 deletions.
56 changes: 17 additions & 39 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,27 @@ Features
Installation
------------

Install the ``elasticsearch`` package with `pip
<https://pypi.org/project/elasticsearch>`_::
Refer to the `Installation section <https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_installation>`_
of the getting started documentation.

$ python -m pip install elasticsearch

If your application uses async/await in Python you can install with
the ``async`` extra::
Connecting
----------

$ python -m pip install elasticsearch[async]
Refer to the `Connecting section <https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_connecting>`_
of the getting started documentation.

Read more about `how to use asyncio with this project <https://elasticsearch-py.readthedocs.io/en/latest/async.html>`_.

Usage
-----

* `Creating an index <https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_creating_an_index>`_
* `Indexing a document <https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_indexing_documents>`_
* `Getting documents <https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_getting_documents>`_
* `Searching documents <https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_searching_documents>`_
* `Updating documents <https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_updating_documents>`_
* `Deleting documents <https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_deleting_documents>`_
* `Deleting an index <https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_deleting_an_index>`_


Compatibility
Expand All @@ -74,38 +84,6 @@ Documentation for the client is `available on elastic.co`_ and `Read the Docs`_.
.. _available on elastic.co: https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/index.html
.. _Read the Docs: https://elasticsearch-py.readthedocs.io

Quick Start
-----------

.. code-block:: python
# Import the client from the 'elasticsearch' module
>>> from elasticsearch import Elasticsearch
# Instantiate a client instance
>>> client = Elasticsearch("http://localhost:9200")
# Call an API, in this example `info()`
>>> resp = client.info()
# View the result
>>> resp
{
"name" : "instance-name",
"cluster_name" : "cluster-name",
"cluster_uuid" : "cluster-uuid",
"version" : {
"number" : "7.14.0",
...
},
"tagline" : "You know, for Search"
}
You can read more about `configuring the client`_ in the documentation.

.. _configuring the client: https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/connecting.html


License
-------
Expand Down

0 comments on commit aad9fa7

Please sign in to comment.