Using x-pack in elasticsearch.py

i run this
Eleatic\elasticsearch-6.2.4\bin\x-pack>setup-passwords auto
command and I got this response :

Changed password for user kibana
PASSWORD kibana = ********************
Changed password for user logstash_system
PASSWORD logstash_system = **********************
Changed password for user elastic
PASSWORD elastic = ************************

now
how to use elastic username and password in
from elasticsearch import Elasticsearch
es = Elasticsearch(
[{'host':'localhost', 'port':9200}]
)

Thanks

See the authentication section in the elasticsearch-py docs:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.