Skip to content

Instantly share code, notes, and snippets.

@rbotzer
Created December 4, 2019 04:48
Show Gist options
  • Save rbotzer/27a14cb3f7de54f72e58ce82c749629a to your computer and use it in GitHub Desktop.
Save rbotzer/27a14cb3f7de54f72e58ce82c749629a to your computer and use it in GitHub Desktop.
One day of data for all 1000 sensors
print("\nGet the data from all sensors for June 19")
if options.interactive:
pause()
dt = datetime.datetime(2018, 1, 1, 0, 0, 0)
keys = []
for i in range(1, 1001):
keys.append((namespace, set,"sensor{}-06-19".format(i)))
one_day_all_sensors = client.get_many(keys)
for rec in one_day_all_sensors:
k, _, b = rec
print(k[2])
pp.pprint(b["t"])
print(spacer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment