Python dictionary state sync keeper with mqtt, read-only
Project description
Syncstate mqtt
This package is made to read from a mqtt broker and update a python dictionary accordingly
How to use
To use syncstate you will need a MQTT broker, for the example the broker is set up on localhost:1883
import syncstate_mqtt
synced_dict = {"value1" : 1, "value2" : 2} # the states will not be changed my syncstate
# Create a connection manager
syncstate = syncstate_mqtt.SyncstateConnectionManager("localhost", 1883)
syncstate.attach(synced_dict) # select the dictionary to attach to
# now your dictonary is synced
while True:
print(synced_dict)
input()
LICENSE
Syncstate - keep python dictionary syncronised over network
Copyright (C) 2025 Goldenbeasty
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
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
syncstate_mqtt-1.0.2.tar.gz
(14.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 syncstate_mqtt-1.0.2.tar.gz.
File metadata
- Download URL: syncstate_mqtt-1.0.2.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb716188170bf99d253f15d6e9a698a2333c3d06c3298fd831bfc2f1fd434dcc
|
|
| MD5 |
cd287cbae88790262ad6a8cf42980add
|
|
| BLAKE2b-256 |
fbe3976446cc63fb6354251eacca3572ee26f318d43125f281f423118960dd84
|
File details
Details for the file syncstate_mqtt-1.0.2-py3-none-any.whl.
File metadata
- Download URL: syncstate_mqtt-1.0.2-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74356045a8668eeef2d7981d9ba207c82f13f5d60612ea4254a83d26a5aeba09
|
|
| MD5 |
f56d3fcfac0941d270f5d21ae54634d3
|
|
| BLAKE2b-256 |
5c845d001b8b75e88843e88cc67136d12d82b5ff1762f1e9c8dc18cbb8873b0a
|