Skip to main content

Python bindings for rustuyabridge — an MQTT bridge for Tuya devices

Project description

pyrustuyabridge

Python bindings for rustuya-bridge, an MQTT bridge for managing Tuya devices via the Tuya Local API.

This package exposes the bridge server as an embeddable component so a Python manager can run alongside it and interpret MQTT topics/payloads identically to the native bridge.

Install

pip install pyrustuyabridge

Pre-built wheels are provided for Linux (manylinux2014 / musllinux_1_2 on x86_64 and aarch64), Windows x64, and macOS (x86_64 / arm64). Wheels are built with PyO3 abi3-py39, so a single wheel per platform supports CPython 3.9 and newer.

Quick start

import asyncio
from pyrustuyabridge import PyBridgeServer

async def main():
    server = PyBridgeServer(
        mqtt_broker="mqtt://localhost:1883",
        mqtt_root_topic="rustuya",
    )
    await server.start_async()

asyncio.run(main())

Helpers

The module also exposes topic/payload utilities for managers that need to match the bridge's wire format:

  • tpl_to_wildcard(template, root_topic) — template → MQTT wildcard.
  • match_topic(topic, template) — returns extracted variables or None.
  • render_template(template, vars) — substitutes {key} placeholders.
  • parse_payload(payload, vars) — parses an MQTT payload into a structured value.

See the project repository for full documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

pyrustuyabridge-0.2.0rc8-cp39-abi3-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.9+Windows x86-64

pyrustuyabridge-0.2.0rc8-cp39-abi3-musllinux_1_2_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ x86-64

pyrustuyabridge-0.2.0rc8-cp39-abi3-musllinux_1_2_aarch64.whl (2.4 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

pyrustuyabridge-0.2.0rc8-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

pyrustuyabridge-0.2.0rc8-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

pyrustuyabridge-0.2.0rc8-cp39-abi3-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

pyrustuyabridge-0.2.0rc8-cp39-abi3-macosx_10_12_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file pyrustuyabridge-0.2.0rc8-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc8-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 fb4c2e73e70cc994f8cd8c5df2eb6e41bc25ebfc0bdd7637dbbb803af74b0c20
MD5 d9e32fbd17db59becd7d748833c3ef0a
BLAKE2b-256 0bd1e5263f2bc95ef89fda08af5e7d82b1c2bee6b42ccfcc54ddeabcdd813ad3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrustuyabridge-0.2.0rc8-cp39-abi3-win_amd64.whl:

Publisher: python-publish.yml on 3735943886/rustuya-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyrustuyabridge-0.2.0rc8-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc8-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6d8dcce122b8d38d0dd8f719e792d005d5c14eab51c978c6923a03188fadfc7b
MD5 c1afa5168f552a3f4b39a022e14ea784
BLAKE2b-256 9bac1ef7c67638f5890939066df46408918e07b8cea1d724f82241400afefd2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrustuyabridge-0.2.0rc8-cp39-abi3-musllinux_1_2_x86_64.whl:

Publisher: python-publish.yml on 3735943886/rustuya-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyrustuyabridge-0.2.0rc8-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc8-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 92e07f0821d880973a98c4891d0ff44d65117da3e457b963f12176c9e00ab5fc
MD5 8a848f5fd857b9d66d6e00029872ea1b
BLAKE2b-256 455f11cc3c8cd757e41d4fb99690d27d603995691f8c4c79f1fae3f71ee3fa34

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrustuyabridge-0.2.0rc8-cp39-abi3-musllinux_1_2_aarch64.whl:

Publisher: python-publish.yml on 3735943886/rustuya-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyrustuyabridge-0.2.0rc8-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc8-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0c07b31595d5f442a6aabfef1ecbd33c5d3e990cdd5c8132164df56bdad2a865
MD5 f8193e39631a54ff0e80c8efce6da5b5
BLAKE2b-256 e806d5bae11a522660768d69a2e918cded6dfb5f0e7d9694a318520b2741ed2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrustuyabridge-0.2.0rc8-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-publish.yml on 3735943886/rustuya-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyrustuyabridge-0.2.0rc8-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc8-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 df8d1bfd30e7771c202ad2c49342eddddd58cd70595585ab30d612a3f945b390
MD5 9ff0f79d6293da2d631a518be3256c33
BLAKE2b-256 eb9c6f304639704b5b3310057388256a0fdc219d7ae9690b3b2972f298ea0874

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrustuyabridge-0.2.0rc8-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: python-publish.yml on 3735943886/rustuya-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyrustuyabridge-0.2.0rc8-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc8-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e77b9d57c5d22788ac8ef9a845b036fa47652989424793e83482b3244bda1fd3
MD5 e1247770dcc8182314c52427f288cd47
BLAKE2b-256 17c4dcac8fbc10c466630c7c5bc804da55c752ff8a5be2281f71d649a8d9fefb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrustuyabridge-0.2.0rc8-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: python-publish.yml on 3735943886/rustuya-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyrustuyabridge-0.2.0rc8-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc8-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 935657e4b03b4af5693fca48d10b111ed679e9698692e3a884ebb17085ef1c3f
MD5 9e8c0b3ba81fa1ef41cf56afed12fd16
BLAKE2b-256 88d4b70effa2ae7d58cec67e9819c8f04884e7bc924aa274cdd719be7f8f1e8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrustuyabridge-0.2.0rc8-cp39-abi3-macosx_10_12_x86_64.whl:

Publisher: python-publish.yml on 3735943886/rustuya-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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