uuid



In [3]:
from uuid import uuid1

In [29]:
uuid1()


Out[29]:
UUID('e8a13982-f651-11e3-a510-f23c9173ce4a')

In [5]:
cd


/root

In [6]:
cd git/SolarDataRESTfulAPI/


/root/git/SolarDataRESTfulAPI

In [36]:
import InfluxDBInterface
reload(InfluxDBInterface)


Out[36]:
<module 'InfluxDBInterface' from 'InfluxDBInterface.py'>

In [37]:
datalink = InfluxDBInterface.InfluxDBInterface("influxInterfaceCredentials.json")


[{u'database': u'by-id', u'host': u'livinglab2.powerprojects.se', u'password': u'1234', u'port': 8086, u'user': u'restapi'}, {u'database': u'by-administrative-region', u'host': u'livinglab2.powerprojects.se', u'password': u'1234', u'port': 8086, u'user': u'restapi'}]

In [38]:
datalink.databases


Out[38]:
{u'by-administrative-region': <influxdb.client.InfluxDBClient at 0x7fed1770c090>,
 u'by-id': <influxdb.client.InfluxDBClient at 0x7fed1770c050>}

In [39]:
topics = datalink.listdataseries()

In [40]:
topics


Out[40]:
[u'by-id/b0dd71a8-efe8-41eb-bab1-633ebaaa778c/metadata',
 u'by-id/c6261166-f651-11e3-a510-f23c9173ce4a/raw_data',
 u'by-id/f1136e33-d227-4fbd-ae72-d3488d70ba89/metadata',
 u'by-id/f1136e33-d227-4fbd-ae72-d3488d70ba89/raw_data',
 u'by-id/32383bde-7648-4abe-9dac-44701eabd72f/metadata',
 u'by-id/46d55815-f927-459f-a8e2-8bbcd88008ee/raw_data',
 u'by-id/b0dd71a8-efe8-41eb-bab1-633ebaaa778c/raw_data',
 u'by-id/e63710a4-78d9-4071-9a2e-ad35534355f4/metadata',
 u'by-id/2a31fb24-347b-4924-ab89-5c434771a2ae/raw_data',
 u'by-id/4cf6c743-8d0b-45f0-aa72-8a0c10315cf5/metadata',
 u'by-id/4cf6c743-8d0b-45f0-aa72-8a0c10315cf5/raw_data',
 u'by-id/802afb51-c5eb-4230-9b22-9a77ef7260b3/metadata',
 u'by-id/e63710a4-78d9-4071-9a2e-ad35534355f4/raw_data',
 u'by-id/2a31fb24-347b-4924-ab89-5c434771a2ae/metadata',
 u'by-id/4a39b124-f594-11e3-a510-f23c9173ce4a/raw_data',
 u'by-id/6f075b69-b823-4e6b-8021-dd751cc79eea/raw_data',
 u'by-id/802afb51-c5eb-4230-9b22-9a77ef7260b3/raw_data',
 u'by-id/46d55815-f927-459f-a8e2-8bbcd88008ee/metadata',
 u'by-id/e8a13982-f651-11e3-a510-f23c9173ce4a/raw_data',
 u'by-id/face0d13-b22d-48fe-bec1-d29732604133/raw_data',
 u'by-id/32383bde-7648-4abe-9dac-44701eabd72f/raw_data',
 u'by-id/4a39b124-f594-11e3-a510-f23c9173ce4a/metadata',
 u'by-id/6f075b69-b823-4e6b-8021-dd751cc79eea/metadata',
 u'by-id/709e47a1-ca88-4c22-890f-2407e9cb131a/raw_data',
 u'by-administrative-region/test',
 u'by-administrative-region/Sweden/Stockholm/Stockholm/parts/messured_Wp_ratio',
 u'by-administrative-region/Sweden/Stockholm/Stockholm/parts/power',
 u'by-administrative-region/Sweden/Stockholm/Stockholm/total']

In [27]:



Out[27]:
{u'by-adminsitrative-region': <influxdb.client.InfluxDBClient at 0x7fed17787510>,
 u'by-id': <influxdb.client.InfluxDBClient at 0x7fed17787910>}

In [41]:
d = MultiDict([('a', 'b'), ('a', 'c')])


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-41-6571b4cac74e> in <module>()
----> 1 d = MultiDict([('a', 'b'), ('a', 'c')])

NameError: name 'MultiDict' is not defined

In [ ]: