Skip to main content

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


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.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

syncstate_mqtt-1.0.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file syncstate_mqtt-1.0.0.tar.gz.

File metadata

  • Download URL: syncstate_mqtt-1.0.0.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

Hashes for syncstate_mqtt-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1034b6ef12564176061495598700d95d3cead73936790c067340c1fc5bc8bfdb
MD5 183e86e8fe9ced398d699b4a5c0ba2ed
BLAKE2b-256 a5bcb48ffbf28ec6e50a2991c751c3c698e733aa9fffe6c4e3edd38f07462c52

See more details on using hashes here.

File details

Details for the file syncstate_mqtt-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: syncstate_mqtt-1.0.0-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

Hashes for syncstate_mqtt-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 32f3e8c66e3e75acd580da28fe5df5bc92a49ed24a3c7c02d250e311bb02373f
MD5 196194cae96a7b507c0ddeaa71b8c044
BLAKE2b-256 398537ef8ec4989563c67be02c9c617a86ccd5f4c56258dddf6b129c06646826

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page