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

Uploaded CPython 3.9+Windows x86-64

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

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

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

Uploaded CPython 3.9+macOS 11.0+ ARM64

pyrustuyabridge-0.1.4-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.4-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.4-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 240b9677b7e6fa3fd5d89690dbf74edcf2bdfde8189407030ad7abd833674602
MD5 980a5596f5d310348b17e96443a8613a
BLAKE2b-256 1ade44c95f220a21e66262e4d6239816a1204ff9712af8995bdc82649d45ca91

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.4-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3b9372a37fbc1c7a57659f5cca2ea3a4741134129b3d4cdb0e72f3e05d50e61f
MD5 ee73a5f71ed2ccec8e0063d008568e14
BLAKE2b-256 703c1a857c3cf42c2c5d0f9c4d06493ef3df8440e361ecf7ac4044719cd20dff

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.4-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 93685eb36ef50dc4831f15346edc7ed26864ac46f6c832ee48b92ec69629baf5
MD5 c3fd7161652174d2c8fc53dd2a504d84
BLAKE2b-256 69535f86c7e49efb6beae6ebd4416e4e2a72db8133731b817fe3f3340c6ca814

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 65406eabc1f03fa8a0382970dadc9e1d0c99b4286c45287d2f3ed1e8eae15aea
MD5 5b05b351d4662d8c2c1674a94f335c30
BLAKE2b-256 7cdbf2272d3958db4ef827b0518bb318699256481ea842af79439e5601fafc7f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f3000c135670d9d5e30b376599c2a2ce9572580e324952fa13ac8a5be2626786
MD5 dea2227eff0ff94ee0aac1d80a880793
BLAKE2b-256 8ba40f32906701a9c3fcf3d4fede56ae9ec01a6b8da67097981dd1096bb82c80

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.4-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1d5c208f64b78fd6a2bd9a358a0edf0a911331c6b66f394b7e28fb61a6bdc75b
MD5 f766d9b6b075b04e047e5cece7c04bab
BLAKE2b-256 a504cb7aa5bc43781921b9fb3fb0746fc8ebc12b82d4ac2f47223e2f39cdb85a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.4-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9c00036fe14ceadba218955e2e713eb7411c8d9d99effdb0058ac9b515bd5b50
MD5 feb50f2cb7f75f177185f40d40a3c91a
BLAKE2b-256 fb0b266111764c987fd83bc67b1042e012df49c1e7c695a88de6078fcecd52be

See more details on using hashes here.

Provenance

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