tempodb / tempodb-python

Python client for TempoDB
MIT License
28 stars 19 forks source link

Update doc examples for correct imports #15

Open myagley opened 11 years ago

myagley commented 11 years ago

Update the examples to import all of the required classes. For example, the code below doesn't import DataPoint

from datetime import datetime
from tempodb import Client

client = Client("api-key", "api-secret")

data = [
    DataPoint(datetime(2012, 1, 1, 1, 0, 0), 12.34),
    DataPoint(datetime(2012, 1, 1, 1, 1, 0), 1.874),
    DataPoint(datetime(2012, 1, 1, 1, 2, 0), 21.52),
]

client.write_key("my-custom-key", data)