Created
March 8, 2014 17:12
-
-
Save ptu/9435194 to your computer and use it in GitHub Desktop.
Thingstore API Random Data
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
import requests | |
from random import randint | |
METRIC = 'Dummy' | |
THINGID = 3 | |
APITOKEN = 'apitoken_dev' | |
THINGSTORE_URL = 'http://localhost:8000' | |
randomthingdata = METRIC + ',' + str(randint(0,100)) | |
uri = THINGSTORE_URL + '/api/thing/' + str(THINGID) + '.csv?apikey=' + APITOKEN | |
r = requests.put(uri, randomthingdata) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment