$ python -m pip install elasticsearch
$ python -m pip install elasticsearch[async]
# Elasticsearch 7.x
elasticsearch>=7.0.0,<8.0.0
# Elasticsearch 6.x
elasticsearch>=6.0.0,<7.0.0
# Elasticsearch 5.x
elasticsearch>=5.0.0,<6.0.0
# Elasticsearch 2.x
elasticsearch>=2.0.0,<3.0.0
# allow up to 25 connections to each node
es = Elasticsearch(["host1", "host2"], maxsize=25)