Client Library

Installing Adafruit IO Python

If you have PIP installed (typically with apt-get install python-pip on a Debian/Ubuntu-based system), run:

sudo pip3 install adafruit-io

This will automatically install the Adafruit IO Python client code for your Python scripts to use. There are usage examples within the examples folder of the GitHub repository for use with MQTT, API, and Basic IO functionality. 

Note: This library requires Python3. It is incompatible with Python2.

Library Usage

We provide usage examples within the examples folder of the GitHub repository for the REST API and MQTT.

If you want to download all the examples to your computer, clone the repository in a easy-to-access location.

To do this, type this in your terminal to navigate to your desktop:

cd Desktop

Download the latest version of the repository by entering the following command into your terminal:  

git clone https://github.com/adafruit/Adafruit_IO_Python.git

Then, navigate to the examples folder by entering the following into your terminal:

cd Adafruit_IO_Python/examples/

Note: For all examples in this folder, you'll need to set the ADAFRUIT_IO_KEY and ADAFRUIT_IO_USERNAME before running the program.

Library Documentation

Documentation for all methods and classes in the Adafruit IO Python library can be found on the ReadTheDocs page for this project

This guide was first published on Jun 13, 2018. It was last updated on Jun 13, 2018. This page (Client Library ) was last updated on Dec 05, 2019.