pink pig figurine on white surface
Photo by Fabian Blank on Unsplash (Edited by the author)

How to Send and Receive Data from Cloud using Python

Ever heard of Thingspeak? That’s our cloud today.

Nikhil Vemu
Geek Culture
Published in
4 min readApr 17, 2021

--

Have you ever wanted to store data (letter, word, sentence, paragraph, or even a full book) in a cloud and retrieve it at any point?

Here, I tell you the easiest way I discovered for the job. It just contains few lines of Python code.

What do you need?

  • A Thingspeak account (If you don’t know it, no worries. Keep reading.)
  • Python (Download it here)
  • Python Editor (I use Geany. It’s light-weight and user-friendly)

I’ll first tell you how we’ll do it.

  1. We access Thingspeak from Python using its free API.
  2. We put data there.
  3. We retrieve it back again by downloading the history of all the data (CSV file)

That’s it!

Prerequisites:

After Python is installed

  1. Install urllib module: Open Command Prompt, type pip install urllib, and press Enter.
  2. Create your free Thingspeak account and channel.
  3. Make your channel public (So Python could access it).

--

--