In [1]:
from influxdb import client as influxdb

In [2]:
db = influxdb.InfluxDBClient("sandbox.influxdb.com", 8086, "root", "root", "solstaden")

In [4]:
db.query("list series","u")


Out[4]:
[]

In [6]:
db2 = influxdb.InfluxDBClient("livinglab2.powerprojects.se",8086,"grafana","grafana123","test")

In [22]:



Out[22]:
[{u'columns': [u'time', u'sequence_number', u'value'],
  u'name': u'series1',
  u'points': [[1403810574120190, 6350001, 2440],
   [1403810573551826, 6340001, 2440],
   [1403810571587382, 6330001, 240],
   [1403810568785948, 6320001, 2240],
   [1403810565502390, 6310001, 1240],
   [1403810564096581, 6300001, 1240],
   [1403810562317765, 6290001, 1230],
   [1403810552862784, 6280001, 1200],
   [1403810548121973, 6270001, 1000]]}]

In [20]:
db2.query("select * from /.*/ where time = 1403810574120190000 and sequence_number = 6350001","u")


Out[20]:
[{u'columns': [u'time', u'sequence_number', u'value'],
  u'name': u'series1',
  u'points': [[1403810574120190, 6350001, 2440]]},
 {u'columns': [u'time', u'sequence_number'],
  u'name': u'test',
  u'points': [[1403810574120190, 6350001]]}]

In [23]:
db2.write_points_with_precision(,'u')


  File "<ipython-input-23-b3b4aaad21b7>", line 1
    db2.write_points_with_precision(,'u')
                                    ^
SyntaxError: invalid syntax

In [33]:
db2.query("select value from series1 where time > 1403810562317765000 order asc limit 2","u")


Out[33]:
[{u'columns': [u'time', u'sequence_number', u'value'],
  u'name': u'series1',
  u'points': [[1403810562317765, 6290001, 1230],
   [1403810564096581, 6300001, 1240]]}]

In [ ]: