Airtrik is an IoT Cloud platform for managing communication between IoT devices and software platforms. This is python sdk that can be used for communicating to both IoT device running python as a programming language like Raspberry Pi and software platform running python. This library can also be used for making realtime data pipeline for applying machine learning on the IoT devices.
Follow the below instructions to get your device and application up and running within minutes. It is very easy to integrate airtrik into your project.
Before proceeding further you have the following software installed in your system or development system.
python (Version > 3.5)
pip (any recent version)
Installing airtrik python library is straight forward, just install it with pip. Although it will work pretty well with your system python. We recommend using the virtual environment for your project
pip install airtrik
import airtrik.iot as iot
# create app in the panel to get the app key
iot.connect("__APP_KEY__")
# you have to create device inside app from panel
device = "__DEVICE_ID__"
iot.subscribe(device)
message = "YOUR MESSAGE TO DEVICE"
iot.send(device, message)
# you can write your custom function handling the incoming message
def onReceive(deviceId, message):
print(deviceId, message)
iot.onReceive = onReceive
iot.waitForMessage()
- Vishal Pandey - Written Python Library - vishal-pandey
See also the list of contributors who participated in this project.
This project is licensed under the MIT Creative Commons License - see the LICENSE file for details