Wednesday, 21 August 2013

curl to xively using python

curl to xively using python

I'm looking to push json packets to xively using this command:
jstr = '''{ "version":"1.0.0",
"datastreams":[{"id":"one","current_value":"100.00"},{"id":"two","current_value":"022.02"},{"id":"three","current_value":"033.03"},{"id":"four","current_value":"044.04"}]
}'''
and running it by calling this cmd = "curl --request PUT %s --header %s
--verbose %s" % (jstr,apiKey,feedId)
I'm doing it this way so I can manipulate the JSON between transmissions
(I change it to a dict and back).
Its throwing an error saying that there is no data sent. Help I'm new to
curl, xively and python so its really confusing me. Any help would be
greatly appreciated please.

No comments:

Post a Comment