High level flask-like MQTT framework.
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', server='localhost', port=1883, user='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 - Use decorators to associate topics with 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: <>
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.1.tar.gz
(6.9 kB
view hashes)
Built Distribution
Close
Hashes for gourd-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53c5e84a420d3490932ea502ee1235af29361bc07c2bb744272f8135b4e01ab5 |
|
MD5 | 0450ff7c2eaf1a21152ce34f66386eb8 |
|
BLAKE2b-256 | 131db2192fd1a4a138f1f5da84ce48b9d380aa5159548c7e5878c6fe6e037b27 |