# %%
from elasticsearch import Elasticsearch
username = 'admin'
passwrod = '<INPUT YOUR ADMIN PASSWORD>'
host = 'https://%s:%s@<INPUT YOUR HOSTNAME>:<INPUT YOUR PORT NUMBER>' % (username, passwrod)
print(host)
client = Elasticsearch(hosts=host, ca_certs='INPUT YOUR CARTIFICATE FILE PATH')
# %%
client.cat.indices(index='*', h='index').splitlines()
# %%
client.indices.delete(index='test2')
# %%
client.close()
Elasticsearch、すごい使いやすいかも…