Created
February 9, 2012 17:17
-
-
Save gadamc/1781322 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from couchdbkit import Server, Database | |
s = Server('https://edwdbik.fzk.de:6984') | |
db = s['automat'] | |
vr = db.view('cryo_2/getData2', reduce=False, descending=True, startkey=["T_PT1", 1318357552], endkey=["T_PT1", 1318357452]) | |
values = [] | |
for row in vr: | |
#the key returned by the view is a list of length two. the first element is the name of the variable and the second is the pc time | |
values.append( [ row['key'][1], row['value'] ] ) | |
#values is now a list of x,y values | |
#for example | |
x = value[1][0] | |
y = value[1][1] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment