title: InfluxDB Python Connection
body: <p>Python Version - 2.7
  InfluxDB Version - 1.5.0</p>
  
  <p>I'm a newbie, and I am trying to connect my InfluxDB database with Python so I can write code for future projects.</p>
  
  <p>I tested out the example program from this <a href="http://influxdb-python.readthedocs.io/en/latest/include-readme.html" rel="nofollow noreferrer" title="good job finding this.">link</a>. (Direct code below)</p>
  
  <pre><code>from influxdb import InfluxDBClient
  
  json_body = [
  {
      "measurement": "cpu_load_short",
      "tags": {
          "host": "server01",
          "region": "us-west"
      },
      "time": "2009-11-10T23:00:00Z",
      "fields": {
          "value": 0.64
      }
    }
  ]
  
  client = InfluxDBClient('localhost', 8086, 'root', 'root', 'example')
  
  client.create_database('example')
  
  client.write_points(json_body)
  
  result = client.query('select value from cpu_load_short;')
  
  print("Result: {0}".format(result))
  </code></pre>
  
  <p>Upon running the program, I am receiving this error.</p>
  
  <pre><code>Traceback (most recent call last):
    File "influxentryexample.py", line 19, in &lt;module&gt;
      client.create_database('example')
    File "/usr/lib/python2.7/dist-packages/influxdb/client.py", line 318, in create_database
      status_code=201
    File "/usr/lib/python2.7/dist-packages/influxdb/client.py", line 124, in request
      raise InfluxDBClientError(response.content, response.status_code)
  influxdb.client.InfluxDBClientError: 404: 404 page not found
  </code></pre>