title: Authentication in Elasticsearch using python
body: <p>I want to use Python in Elasticsearch. So I wrote an Authentication code in Python for Elasticsearch. But I'm getting the error "TypeError: 'Session' object is not callable". Here's the code:</p>
  
  <pre><code>import requests
  from requests import Session
  from requests.auth import HTTPBasicAuth
  uname = 'elastic'
  pswd = 'elastic'
  session = requests.Session()
  session.auth = HTTPBasicAuth(uname, pswd)
  res = requests.get('http://localhost:9200',auth=session)
  print(res.content)
  </code></pre>
  
  <p>Where am I going wrong?</p>