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.
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:
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:
Note: For all examples in this folder, you'll need to set the
ADAFRUIT_IO_USERNAME before running the program.
Documentation for all methods and classes in the Adafruit IO Python library can be found on the ReadTheDocs page for this project.