Skip to content

Instantly share code, notes, and snippets.

@jrbail01
Last active March 11, 2019 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrbail01/c67660200828fec5a0eaf852637530a7 to your computer and use it in GitHub Desktop.
Save jrbail01/c67660200828fec5a0eaf852637530a7 to your computer and use it in GitHub Desktop.
import requests
import json
ACCESS_KEY = "PLACE YOUR INITIAL STATE ACCESS KEY HERE"
BUCKET_KEY = "reqtest1"
def streamData(name, value):
url = 'https://groker.init.st/api/events'
headers = {
'Content-Type': 'application/json',
'X-IS-AccessKey': ACCESS_KEY,
'X-IS-BucketKey': BUCKET_KEY,
'Accept-Version': '~0'
}
data = {
'key': name,
'value': value
}
r = requests.post(url=url, headers=headers, data=json.dumps(data))
return r
r = streamData("myNumber", 5)
print r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment