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

Uploaded CPython 3.9+Windows x86-64

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

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

pyrustuyabridge-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

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

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

Uploaded CPython 3.9+macOS 11.0+ ARM64

pyrustuyabridge-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file pyrustuyabridge-0.1.0-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 946c9855a935838139d7182bf5cb2fdeaa535b40ac42e141d22fc896d0cb00d7
MD5 3ef119013e3bdf6431cbaf8af811a2dc
BLAKE2b-256 1a1fa2a84447615a2a2dcc444fe8334b2c6e23b284743cd8bb53e27146f4416d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.0-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 bdaeb1e6e8d43bc8119a9d4d20fc3862bf93c2c4d2138893270802e9fc0d4517
MD5 1b6a2ff535e781fc1a48433495a93549
BLAKE2b-256 1da4a3734f105d4f6dd1113d510f7493d1558d5321d9711879754a80f5739cce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.0-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 dd14a639320bd3986d4664c9a0c15a814833b4c0e82e8ff821e9d75b1791de6a
MD5 1dda404ada98a8a3994fd5f4eb634101
BLAKE2b-256 e1451221b94d094e9c5827718155c24aedfdb4457d3e313d61fe403ae4993a09

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0a12ca692cc247170180b57688a3e0f1a03981b6f44ad8809fb752ab5edc3892
MD5 3623025c099e422f458a9e9fe920552b
BLAKE2b-256 ef22f2dde283be2a2eb542400cf45caf3112e068bfffdb374973041718770d0e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7be6f27f81a387421a84f2adf7463e3037ae22a93f5af13d3b911470d668cd28
MD5 e9a54d2b247cd73ce578598062cbfa35
BLAKE2b-256 2795c8bae554ef815b14ee10d0313b274b4f19deb24b955f8991852a6a2b4d93

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 08bd5e52d71387081855785ded775d48be65904af9e5760182a3eceb9e8772b4
MD5 32015204b9180af95ef5346380b00377
BLAKE2b-256 d5de022648947b51f3008c8947a5e6a9c1eaa1def76b8f5b94fa7d14d88cae01

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e78c96566ade20fd122b15c02bd2b61a2cee5258edd64b4e7a75692ea24781e7
MD5 e1340ba841b8e8c24408e3a0d5c86c89
BLAKE2b-256 72c8860db23dabb225254c519db9fb59b21864f5d1baa056079d0d7f2706d336

See more details on using hashes here.

Provenance

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