Skip to main content

A package for IoTs to interact with Alfons

Project description

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

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for alfonsiot, version 0.0.11
Filename, size File type Python version Upload date Hashes
Filename, size alfonsiot-0.0.11.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page