diff --git a/tempodb/demo/tempodb-bulk-write-demo.py b/tempodb/demo/tempodb-bulk-write-demo.py index ca65cc3..409e13e 100644 --- a/tempodb/demo/tempodb-bulk-write-demo.py +++ b/tempodb/demo/tempodb-bulk-write-demo.py @@ -5,7 +5,12 @@ import datetime from tempodb import Client -client = Client('your-api-key', 'your-api-secret') +# Modify these with your credentials found at: http://tempo-db.com/manage/ +API_KEY = 'your-api-key' +API_SECRET = 'your-api-secret' +SERIES_KEY = 'your-custom-key' + +client = Client(API_KEY, API_SECRET) ts = datetime.datetime.now() data = [ diff --git a/tempodb/demo/tempodb-read-demo.py b/tempodb/demo/tempodb-read-demo.py index 9f56c07..a3d70a7 100644 --- a/tempodb/demo/tempodb-read-demo.py +++ b/tempodb/demo/tempodb-read-demo.py @@ -5,12 +5,17 @@ import datetime from tempodb import Client -client = Client('your-api-key', 'your-api-secret') +# Modify these with your settings found at: http://tempo-db.com/manage/ +API_KEY = 'your-api-key' +API_SECRET = 'your-api-secret' +SERIES_KEY = 'your-custom-key' + +client = Client(API_KEY, API_SECRET) start = datetime.date(2012, 1, 1) end = start + datetime.timedelta(days=1) -data = client.read_key('your-custom-key', start, end) +data = client.read_key(SERIES_KEY, start, end) for datapoint in data.data: print datapoint diff --git a/tempodb/demo/tempodb-write-demo.py b/tempodb/demo/tempodb-write-demo.py index 6df67d0..bccf505 100644 --- a/tempodb/demo/tempodb-write-demo.py +++ b/tempodb/demo/tempodb-write-demo.py @@ -6,7 +6,12 @@ import random from tempodb import Client, DataPoint -client = Client('your-api-key', 'your-api-secret') +# Modify these with your credentials found at: http://tempo-db.com/manage/ +API_KEY = 'your-api-key' +API_SECRET = 'your-api-secret' +SERIES_KEY = 'your-custom-key' + +client = Client(API_KEY, API_SECRET) date = datetime.datetime(2012, 1, 1) @@ -20,4 +25,4 @@ data.append(DataPoint(date, random.random() * 50.0)) date = date + datetime.timedelta(minutes=1) - client.write_key('your-custom-key', data) + client.write_key(SERIES_KEY, data)