A lightweight wrapper around Paho MQTT client
Project description
NanoMQTT
A lightweight wrapper around Paho MQTT client
Install
pip install nanomqtt
Example usage - Thingspeak
import random
from nanomqtt import Client
client = Client(
host="mqtt3.thingspeak.com",
port=1883,
topic="<topicid>", # channel
client_id="<clientid>",
user="<userid>",
password="<password>",
verbose=True, # send messages?
sample_period=1 # delay between messages (in seconds)
)
while True:
client.send(fields=[random.randint(0,1)]) # send a random integer between 0 and 1 to the channel in field 1
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
nanomqtt-0.1.0.tar.gz
(2.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nanomqtt-0.1.0.tar.gz.
File metadata
- Download URL: nanomqtt-0.1.0.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a7b2fb44a2ea34cb93a4f415cb61d1fe2de8f44138abf515cedde6b27d0af41
|
|
| MD5 |
c6fecbb07507f7e908bdcaaa30fa5860
|
|
| BLAKE2b-256 |
c3940b196c19c7a90385a21ee1f2544dad320f865a447836af9c1d61bef52de4
|
File details
Details for the file nanomqtt-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nanomqtt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e00630e51bff02625c13f6b396162667040252deabc3383fece6f1576a6053a
|
|
| MD5 |
c523a48f4d4cebabec2da596cea3a085
|
|
| BLAKE2b-256 |
81bbfc1e04f394ca4b8756884fa0d5d0ad7a45823fcfefbde7f2ad43a0c67381
|