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

Uploaded CPython 3.9+Windows x86-64

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

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

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

Uploaded CPython 3.9+macOS 11.0+ ARM64

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc2-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e5339d538e3ad71d7217a621e83d3da1655ae002df234e7191d8a422bf5859ef
MD5 7bbe65ab51464f82b5b9f9ba38643ea2
BLAKE2b-256 5511bf3d7d3521aac25d484560dd7342d241bb9838cf4777dc0728dd444b476c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc2-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 8049fa9d26c12de5b31d84e6f69755c67a2ca0c2f20409d28dbff9fc78cf7ad1
MD5 ea88fbc6d86ddef15c2864e6476330a4
BLAKE2b-256 771a48c29406956ecfc3f300a31a94e263600d380ed71192d287d0aba23c6428

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc2-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 61be62cbe52e8c6097b8167fb2a47dfa22c53ec06ef76b5fcdfcc6fef075e772
MD5 0c0fd0caf356ddeb3db5070234d81e9a
BLAKE2b-256 afc27be8071801cdd8f27934a2c93049b37a1479f0d8057ccb4c08c9d195b621

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7f681f9667e2659275feedf6cb47c98a044fba0edcdb451bf575982687636478
MD5 7cee3f001e72f2eedc37efacfb3e97da
BLAKE2b-256 d3958d636efc1c89ea8e588976bda5884a66ccb239422387742ab5033a307b16

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0785a9f2383fbf07c61bdd55fb2eea32c90ebcae9d9b6eda8429b4c91544d6fa
MD5 2985b4509ee52c38fc8dd727d471cb35
BLAKE2b-256 ef35f72d1c3478440ac12fe8a432abcc0852759be50edf6dec4cf6190680ecdc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc2-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3a473c40c6b2818e7c87b8624c0a1aa9befef8f6cde6d8020da6e6dda156ec44
MD5 91ade880ff07d9b19766d118bc70ba33
BLAKE2b-256 5328cdb571cfac88a857164fc2414f940b998b4cd005f00635eb325802d6101d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.2.0rc2-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0cf519e3beb031db1afa2ce2a104ae9b3bd4636987a836afe788e09cde82423d
MD5 17409e7ac4142dc8065d2d61512929f4
BLAKE2b-256 2aaf5fcb9d0470900e201c809909550b153d1e08af382165d32fb537531802bd

See more details on using hashes here.

Provenance

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