aioworkers plugin integration to mqtt
Project description
Features
Queue over mqtt
Storage over mqtt
Install
Use uv to add to your project (recommend):
uv add aioworkers-mqtt[paho]
or install with pip:
pip install aioworkers-mqtt[paho]
Usage
Add this to aioworkers config.yaml:
queue:
cls: aioworkers_mqtt.Queue
host: localhost
port: 1883
user: user
password: ***
qos: 1
format: json
topics:
- a
- b
storage:
cls: aioworkers_mqtt.Storage
host: localhost
port: 1883
user: user
password: ***
qos: 1
retain: true
format: json
prefix: room/device
You can work with queue like this:
await context.queue.put({"a": 1})
d = await context.queue.get()
and work with storage like this:
await context.storage.set("a", 1)
one = await context.storage.get("a")
Run:
aioworkers -c config.yaml -l debug
Development
Check code:
hatch run lint:all
Format code:
hatch run lint:fmt
Run tests:
hatch run pytest
Run tests with coverage:
hatch run cov
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
aioworkers_mqtt-0.1.0.tar.gz
(9.8 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 aioworkers_mqtt-0.1.0.tar.gz.
File metadata
- Download URL: aioworkers_mqtt-0.1.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31810cd8105ad7b9cc02b92baf69e85493aed94530df99f40aee3b3044970b93
|
|
| MD5 |
3856005d7e17f9beadfd80c38ddbfb21
|
|
| BLAKE2b-256 |
b2840311894c3a5937cf614ba16f45c377c9e8d5b2ebee67d1e4563cbd3276fa
|
File details
Details for the file aioworkers_mqtt-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aioworkers_mqtt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f9a8ebaa3ea110480b94495e897e97e7b364ab37808a7fb1ddb626b8a0b4059
|
|
| MD5 |
0b060eba92f981f92db474aebcab873a
|
|
| BLAKE2b-256 |
a7e6c38191839c795e8e5ab8d167d12d623835693666cb24c2812d50bf2117fc
|