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

Uploaded CPython 3.9+Windows x86-64

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

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

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

Uploaded CPython 3.9+macOS 11.0+ ARM64

pyrustuyabridge-0.1.3-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.3-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.3-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 43526185c370dd7db8892de8e51cff3f4c24f0eb145adc47065a757a7057f4d9
MD5 8036a00039db542cbecd6c3be8603b84
BLAKE2b-256 5966fcb8c7781435e4c669431d00a809f85dd13aee5e3eae32a83475025d1bef

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.3-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1b7d22ea950743822d26a46a74032da8fb8b5612a31f0b8202c64bcd164fbea6
MD5 6b5f2d8c8a0073b6776404693c6eb2dd
BLAKE2b-256 1bd1157320b4e55a5d6a95a79387a01eaede94d0bc13f2af39e8430d4fe8b36b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.3-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 d8389426608b0fa791860c30826909e5d8febf176139d681e7075245d38f344f
MD5 c8439d0c3e712e4820e2cdaf8283435b
BLAKE2b-256 8f5067b4289d2b1cf7702d8d4f003a72d9695bc23cc3eab1b5e5a5a47d10e676

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 db17ee786084fd4dfe0c30ec338289856c32947263eaf9bd89ea032d8a5238b0
MD5 f402061b64b223ff4b26611bb869be7e
BLAKE2b-256 c77ac78e032a0aa92c83f6a0a456afa76cac34396fc658b775f6f8a374500678

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8c549f25fd5e46fb08f8ad17f0d85df86c90615d72325dd7f45f91971ba36123
MD5 21a9e52c6bc1a24e1efbb39d97d3e49e
BLAKE2b-256 a86c27252b7225916dd74346cbd2a477c4de2f82eab7b85e606f8e8ddd65628e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.3-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a1dcdd8c40a5c0b0b00f9e78bf7aac901ad66447575d2e427523bcdd3cf1b6b1
MD5 a82a743476634337a97413868c9c12ed
BLAKE2b-256 4c502811033f5c026fc2459f1841c6a9926748ebd59a33101faa8fa5e197c507

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a8ffa6cd755c3529e7404740c214a7fb1df7a7e273d0d714e7177c495690344b
MD5 c0ca9213fe6c4f463aa2de3c36eb7134
BLAKE2b-256 ea9611271712084e0524dbad4052e6c9f0dd1d62a26e54b0708f4b98661bfb7c

See more details on using hashes here.

Provenance

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