No project description provided
Project description
django-mqtt
MQTT tools for Django project
Usage
- Add
"dmqtt"
to yourINSTALLED_APPS
- Add
MQTT_HOST
,MQTT_USER
,MQTT_PASS
,MQTT_PORT
- Run with
python manage.py mqtt
from dmqtt.signals import connect, regex, topic
from django.dispatch import receiver
@receiver(connect)
def on_connect(sender, **kwargs):
sender.subscribe("#")
@topic("some/mqtt/topic")
def simple_topic(sender, topic, data, **kwargs):
pass
@regex("^some/(?P<username>[^/]+)/(?P<topic>[^/]+)$")
def regex_topic(match, data, **kwargs):
device = match.groupdict()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-mqtt-0.0.2.tar.gz
(4.8 kB
view hashes)