About Checking the Version of Elasticsearch Server

To check which version of Elasticsearch is installed on a server, do this in Django shell:

>>> from elasticsearch import Elasticsearch
>>> es = Elasticsearch()
>>> es.info()["version"]["number"]
'7.5.2'

Tips and Tricks Dev Ops Development Python 3 Elasticsearch