Skip to content

Instantly share code, notes, and snippets.

@astanway
Created March 12, 2014 16:07
Show Gist options
  • Save astanway/9510075 to your computer and use it in GitHub Desktop.
Save astanway/9510075 to your computer and use it in GitHub Desktop.
data = [
... {
... "name": "response_times",
... "columns": ["time", "value"],
... "points": [
... [1382819388, 234.3],
... [1382819389, 120.1],
... [1382819380, 340.9]
... ]
... }
... ]
>>> db.write_points(data)
True
>>> db.query('select value from response_times')
[{u'points': [[1382819389, 20001, 120.1], [1382819388, 10001, 234.3], [1382819380, 30001, 340.9]], u'name': u'response_times', u'columns': [u'time', u'sequence_number', u'value']}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment