alfonsiot-0.0.9
توضیحات
A package for IoTs to interact with Alfons
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | alfonsiot-0.0.9 |
| نام | alfonsiot |
| نسخه کتابخانه | 0.0.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Anton Lindroth |
| ایمیل نویسنده | ntoonio@gmail.com |
| آدرس صفحه اصلی | https://github.com/ntoonio/AlfonsIoT |
| آدرس اینترنتی | https://pypi.org/project/alfonsiot/ |
| مجوز | - |
# Alfons IoT
This is a package for IoT's to interact with Alfons.
import alfonsiot
def onMessage(iot, topic, payload):
print("onMessage", topic, payload)
def onTopicMessage(message):
print("Got message from specified", message)
def onConnect(iot):
print("Connected!", iot)
iot.subscribe("topic", onTopicMessage)
iot.publish("topic", "Message!")
iot = alfonsiot.start(host="", port="", username="", password="")
iot.onConnect = onConnect
iot.onMessage = onMessage
نحوه نصب
نصب پکیج whl alfonsiot-0.0.9:
pip install alfonsiot-0.0.9.whl
نصب پکیج tar.gz alfonsiot-0.0.9:
pip install alfonsiot-0.0.9.tar.gz