Connecting to OpenSearch with Python
In this example, we will use Python Elasticsearch client library.
  • Prerequisites
You need to install Python on your machine. Depending on your operating system, download and install python. Note: This sample code uses Python3.
  • Installation
Install Python opensearch-py client package using pip pip install opensearch-py
  • Connecting to cluster
  • Indexing
  • Getting a document
  • Deleting a document and an index
Full Sample code Replace public IP, username and password with your real setting
By Instaclustr Support
Need Support?
Experiencing difficulties on the website or console?
Already have an account?
Need help with your cluster?
Contact Support
Why sign up?
To experience the ease of creating and managing clusters via the Instaclustr Console
Spin up a cluster in minutes