from elasticsearch_dsl import connections connections.create_connection([hosts=["http://username:password@elasticsearch.com]])