By cjsmith
via css.dzone.com
Published: Feb 03 2012 / 00:30
I was playing around with PiCloud’s REST API and had a bit of fun writing a C client for it. Now, why C? Well, because one of the reasons they provide a REST API is for your non-Python programs to easily access your Python code on PiCloud. What I did is simple: I published the square_func using PiCloud’s documentation. Then I used libcurl’s C Interface to replicate the curl statements provided in the documentation. I have written the client in two parts: client1.c and client2.c. client1.c invokes the published function, hence gets the Job ID. client2.c then uses this jobID to get the result.



Add your comment