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

Uploaded CPython 3.9+Windows x86-64

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

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

pyrustuyabridge-0.2.0rc10-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.0rc10-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.3 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.9+macOS 11.0+ ARM64

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc10-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 7f27f93b11e5e1db3ab31c957347c414ef3359928f3ebae0c48e27c8bf8a6bef
MD5 1f23968990f6d68dc0bfeba27ce50513
BLAKE2b-256 c9eda3144655d933acf1a99e6f590fb500c48f363323cb8357af47c96292544d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc10-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a7a9ee248fdb3a62d6c9b65795948cddc2787b157b761bdf3a5cd17b81c1836b
MD5 c18749069dbab172040824b012788525
BLAKE2b-256 99dde057dcc149dfaa6f815b406d756716bc52f04ce0a839ffabea5f336aa369

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc10-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 0211dc48efd5b98281fa097b5e4dd83937dd8a9a570c189a9e10e36f6d5828dc
MD5 e7602de59960e452eab0eaeb01b67832
BLAKE2b-256 008725a4d8bedf2d892100eb25bfd3cbdb0d760707e806c1ed71f9250c04b919

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc10-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 406da8556fa9d0b6c510130c54cd3a1ef0926deb86b0a1cdb0475543f28fb80a
MD5 80535fb6248ae248cfa5fa186fec726b
BLAKE2b-256 75d10ec0ccb254848fa66fdd3b51fb49d2828e6a0ed2cbb19c952119342527a9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc10-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b799a474c6773e7a3c87557ea17ffaa861bbc12ac1900f180c66b2a67a3a6524
MD5 d358fa457306e88f46c35e8401c34e71
BLAKE2b-256 1f97ca5f6733084e5ba1b9ea2c5be0f26a46b45bdb9baed550a735454a3f34de

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc10-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dc9cdfcd59254e1a4f01056280f139ffd620c91142654bd3d1ddb1e443aa00ee
MD5 e5f69151f279f058402f5ba4f1340dd7
BLAKE2b-256 6f9594b79743a81a5b6f43a435f4c59cee75b66e129e6301a6ca26c0383f7b5b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc10-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7a3d6b1f44eb76ebd11c8b388dd4c86edec68c037f44cd84c072f66cd135bf82
MD5 8c29b463d97cc5c14c3b205ff7d09b46
BLAKE2b-256 9f2affb4eea7ebe2ed7863a2faeb409bbd070811a51a5e6cf91e08924a4dc67e

See more details on using hashes here.

Provenance

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