Metadata-Version: 2.4
Name: nanomqtt
Version: 0.1.0
Summary: A lightweight wrapper around Paho MQTT client
Author-email: NanoSievert <no@dontcontactme.com>
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: paho-mqtt>=2.0.0

# NanoMQTT
A lightweight wrapper around Paho MQTT client

## Install
```bash
pip install nanomqtt
```

## Example usage - Thingspeak

```python
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
```
