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.1.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.1-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: syncstate_mqtt-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 8d8a965c1b6562b83f67bb10f460b8b2955135f4b281e47b4d4763ca3e2a5759
MD5 494aaa280faf72947a68adb3e062bd00
BLAKE2b-256 0736bcc173614e3e6aae7d8f4fa15cd77ce76df16447388721a433df92206fb5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: syncstate_mqtt-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 26122bd4cb0f3fafb4d7b8c0c619cb496774e7554345832b3a77e4a9a8bcafff
MD5 a79d0b1164a3920a415faa98f94fcf71
BLAKE2b-256 f8f572f2476093797e15e1468157cc59011a525f1d4561b264c3490e0b3f1f9c

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