I've have a question about using Python together with InfluxDB. I've got multiple Rasperry PI's collecting time series data of sensors (like temperature,humidity,..) and saving them to my InfluxDB.
Now I want to use another PI to access that Influxdata and do some calculations, like the similarity of those time series. Because the number of queries can differ from time to time i want to dynamically ask for a list of all entries and then query that data.
I did that really helfull tutorial over here: https://www.influxdata.com/blog/getting-started-python-influxdb/
There its stated to use
client.get_list_database()
to get a list containing all databases, which returns in my case:
[{'name': 'db1'}, {'name': 'db2'}, {'name': 'sensordata'}]
My target now is to "go deeper" into the sensordata database and get a list of all time series whichare contained in these database, which are for example RP1-Temperature1,RP2-Brightness1,.., and so on.
So to makes things clear, my magic query would contain the length of my query and the database and would return me a python dictionary containing the names and values of the time series.
Thanks in Advance!!
The Python Client allows you to query database with line protocol.
The command
SHOW series
will yield all series contained within a database.
What to do with the result is up to you and I think you should be good on your own from here. Actually reading the Influx Python client documentation would have answered most of your question.