An opinionated framework for writing MQTT applications.
Project description
Gourd - An MQTT framework
Gourd is an opinionated framework for writing MQTT applications.
Simple example
from gourd import Gourd
mqtt = Gourd(app_name='my_app', mqtt_host='localhost', mqtt_port=1883, username='mqtt', password='my_password')
@mqtt.subscribe('#')
def print_all_messages(message):
print(f'{message.topic}: {message.payload}')
if __name__ == '__main__':
mqtt.run_forever()
Features
- Create a fully-functional MQTT app in minutes
- Status published to
<app_name>/<hostname>/status
with a Last Will and Testament - Debug logs published to
<app_name>/<hostname>/debug
- Use decorators to associate topics with one or more functions
Installation
Gourd is available on pypi, you can use pip to install it:
python3 -m pip install gourd
Documentation
WIP
Reporting Bugs and Requesting Features
Please let us know about any bugs and/or feature requests you have: https://github.com/clueboard/gourd/issues
Contributing
Contributions are welcome! You don't need to open an issue first, if you've developed a new feature or fixed a bug in Gourd simply open a PR and we'll review it.
Please follow this checklist before submitting a PR:
- Format your code:
yapf -i -r .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gourd-0.0.6.tar.gz
(6.3 kB
view hashes)
Built Distribution
Close
Hashes for gourd-0.0.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8def5420c6af3d7d0008abdd100dd118904758b72da0535e01a86ff4c472860e |
|
MD5 | 8313b1faa708a4a78ace364231db97d3 |
|
BLAKE2b-256 | 46af3b8645616f1e4e23a0f3cb12c2b6482621e880275659a8a05746ecb60ba7 |