CloudPlugs REST Client for Python is a library to perform HTTP requests to CloudPlugs servers. The official repository is: https://github.com/cloudplugs/rest-python
Cloudplugs is a cloud based IoT platform to enable the fast prototyping, connection, deployment and management of smart "Things" (sensors, smartphones, home appliances, etc.). Different objects can interact with each other by publishing and/or reading any type of data on shared channels through simple communication protocols. You can learn more at http://www.cloudplugs.com/how-it-works/ and you can sign-up on http://www.cloudplugs.com/register to start connecting your Things.
Just include dependencies and the library in your Python script
Create a new instance:
Now you are ready to configure the library and invoke functions to perform REST requests to the server!
After you have a new istance of the class, there are a few configuration parameters you can customize (if needed) before invoking any request. This parameters are:
You can set these options using the proper functions, like the following example:
When you have your istance of the library ready, you can finally execute HTTP requests to the server by invoking any of the request functions. All the requests are synchronous and are performed according to Cloudplugs Rest API documentation. Example: