Create Index with Python and Login

UPDATE. SOLVED by bypassing the RequestsHttpConnection

I am trying to create a index using python

import elasticsearch
from elasticsearch import Elasticsearch,RequestsHttpConnection
es = elasticsearch.Elasticsearch([''],
es.indices.create(index=index_name, ignore=400)

This seems to be giving me a bad status line error. I am not really a python guy but this is all I would have to do anyways to get my code working. What am I doing wrong?

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