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

Uploaded CPython 3.9+Windows x86-64

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

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

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

Uploaded CPython 3.9+macOS 11.0+ ARM64

pyrustuyabridge-0.1.2-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.2-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.2-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a38e8e638ea223eaed913967522c09a0152bc1c42129aca28c303a6122eab2be
MD5 5f786d550be280607ae658ed93665b5d
BLAKE2b-256 7701c7ba7b8b2913481dce8035fd35e8f7a5e4407094dc904bdebcc62b591f64

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.2-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3d1088774e3e5d39d5f0a36a4b4834357efecaea36f14807dafd2f99ea7e1726
MD5 f512e81e632c397bb1ef4a36f0929e41
BLAKE2b-256 5e154a6b4d228297607129c1d12733f80fcddfb068641b96c3e885c7e399ef14

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.2-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 9253fb40d30982f0c399e9eed98dd496f228d24bdbd350be3713ec06753676b6
MD5 23d0ecae50193fd0a0753d552de7758c
BLAKE2b-256 5240146e64680280bb7ffa85ab4cf0dc632d8a4716be1f563e87c8323d94a312

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 40b3b48857aab2135845ef54a9419a850d6f058a44d9c2c7c8eded565d72f882
MD5 b781ccb836f957927dfd6d54975a8f44
BLAKE2b-256 8adad88cab29a5249f5557d365f56ee1b69f9cb4e17eaa949726f4e5e9725c9c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 dc31d2b695acfe4a1d01394ae4b95e1fbba18e26e9fc98e023438ff4490ebcbc
MD5 02a8a86a2319130933e680a9c94cd653
BLAKE2b-256 3f35153e15e4d81fef5c1272ccfc0ecec6f9fed06041c4e9294ea73695210da1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.2-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e42638df273cd0a27310c425e8f33a2ca2727e230235f4eb3c99022bfe3389a5
MD5 0f0eccbda64e5cbf7b8acd4d90c97659
BLAKE2b-256 cace4991d9047e58a54be92b13dc880655101684412f489fdf3dfffbe7b512c1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyrustuyabridge-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0e3b886f0aae2cdb54fa7200fffd42a4cbfdb860dd4d8366521af69109f6b584
MD5 8c54d87a74b9a131fd8c9cfab9f2766e
BLAKE2b-256 64b88d0477e44a077283cf61e6d630f58b3f597a78d604919448040eef7e582e

See more details on using hashes here.

Provenance

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