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

Uploaded CPython 3.9+Windows x86-64

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

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

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

Uploaded CPython 3.9+macOS 11.0+ ARM64

pyrustuyabridge-0.1.1-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.1.1-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.1-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d6979004be90df15c3530339bdc49c98ff683681155ae810087067d71c45ff10
MD5 0b88ba9275292e074d6e17d99436ff27
BLAKE2b-256 ea207cdb47f14534a6e016edb4a80ff2abdd6a4c5d2d8722dde84c4b3955028c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.1-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 86337d36fe7da1f62ac83bbf35a7e717acde1016b83b2e0c01b14d1627d80b5c
MD5 0ea1cb0f5976617877519cd3def35b54
BLAKE2b-256 59931b7f5a4812e75b812d3d3d97a13c7eadb25324a8e5980491a6347f22dd88

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.1-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 8c1f072fa65f93494d3219e149f146cc71883f1a324fa0422c9424a5101756c5
MD5 a5700059db8580cf64982108ec4fe25d
BLAKE2b-256 435208ffdfb7cb6c07376138a79e90a6a44803017cea993fe983fab6a561f397

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e13a78f9660a884c5eb0c0a0ef8e94f9cc5984931eecf4c86deef94d536a7e82
MD5 e3cc01793812dc77be3742cf262ac4e8
BLAKE2b-256 53a74d1e1c86aab5b412d16606478bf7c76b7d6e423709d553299267f3b3e961

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a3330befbe1bb537e4a8c256d35d3399d32bf69dc046e913d9eb75d50bbdebe1
MD5 de8e385762440b6d68ed407a2a5c3c4b
BLAKE2b-256 a01e852e54102dc79b530ffcc3415d59cd6598b258976d3edd00e99d0eaeea6f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.1-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7f1695c792f859d3d268cc0b2a944be0488820a606d89ab16ee54b04da7f8514
MD5 2f00b58ed4250b81a5707313756cd9e5
BLAKE2b-256 07550946b165a1459e37ceb70bfce816695b9fbafb34bb6d12bddb2a71695dc9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5f17d4742cc4ec774388a19c5aa6d4374cea6088749c544ae73d89eafdb0c2f4
MD5 435691f6612b3544cc2df94d5e8ba074
BLAKE2b-256 989964c932749a458d9ab4a8a45e456ed690b94661cb0d563005c7eee76305fa

See more details on using hashes here.

Provenance

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