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.0rc5-cp39-abi3-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.9+Windows x86-64

pyrustuyabridge-0.2.0rc5-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.0rc5-cp39-abi3-musllinux_1_2_aarch64.whl (2.4 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

pyrustuyabridge-0.2.0rc5-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.0rc5-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.0rc5-cp39-abi3-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

pyrustuyabridge-0.2.0rc5-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.0rc5-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc5-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 63b24f3a4798ee0ec2edade16e0f44966193332e29e4d0e7feacacb764cb1e12
MD5 b6cac52605c2acb1c9cab60c337f7ca3
BLAKE2b-256 c5fd8f113687572ce067754c6cac579717c484d953c122aef468d0e9723888ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrustuyabridge-0.2.0rc5-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.0rc5-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc5-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 78de5a834f87089423aa8b1e93eb02735b3fdb4f713f47fa8e3e16f0de5c3f43
MD5 67f3973f46d74668b26601245463cb05
BLAKE2b-256 ee4a63ca7ad949c9e6c5534d653fc74d6d06aa5838d9d3a7576d41c51513e5ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrustuyabridge-0.2.0rc5-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.0rc5-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc5-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 9468027f50a83de089a5aaaa0a3e8750042a6d053bbe4c632f268fbf13a88572
MD5 1406bfd892b54487271aa53208d2a776
BLAKE2b-256 84f14e55e3854eeed37c3599d006e7bd04f3b0b812f3d59ca07d7c43121bff09

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrustuyabridge-0.2.0rc5-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.0rc5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ceb6aca2fef6dd7cb00a4e3214fc0250d931cc8082c1a64ccb155817df88cef6
MD5 787558d72d119d39d5743aa9f8cfafcc
BLAKE2b-256 53aab1d4811a0125ae83d880fd60d6ede963d93ce3215a8ea0a533b2d8844be3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrustuyabridge-0.2.0rc5-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.0rc5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 91ecc94f7c25e126bc00467a3849fdfd9e841d8a9209db2addb027355df7c2c6
MD5 bff6519540c8e6e5dcf50a988816dbe0
BLAKE2b-256 89b60225829774b8a0be6b10700da047bda6d0e979034bf40ae0339a9c19122c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrustuyabridge-0.2.0rc5-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.0rc5-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc5-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b84dae960e972f94779193c5ad1c030e026611508b87aa944dc706f16e3aa6b9
MD5 53e0235796891275eb1b3e383bd9f46f
BLAKE2b-256 8a3829e214e514de6fb5d112f8a823fedba635204dc516409ac6821552ec33d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrustuyabridge-0.2.0rc5-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.0rc5-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc5-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f5f8f2808b8f045d74e8542b30f45ee8d6739c0fc393452a879a200cb217dcbf
MD5 55a25bc4afaaaad853daf86e2aace4f6
BLAKE2b-256 efcb8175a7928945950bd9fbc5060251caee910759ef39d2fa43976f76f51e24

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrustuyabridge-0.2.0rc5-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