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 orNone.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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyrustuyabridge-0.2.0rc6-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: pyrustuyabridge-0.2.0rc6-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24e174cd3a3311282dc3c19a8d330a6f4df7338b6918d9797b5575c8aca26c49
|
|
| MD5 |
3808f6dfcaae79c618d6b3c59786a055
|
|
| BLAKE2b-256 |
0289d22f6ee408d0896653077cf0dfc6e0005961e9655ed5a2b852d451aecb67
|
Provenance
The following attestation bundles were made for pyrustuyabridge-0.2.0rc6-cp39-abi3-win_amd64.whl:
Publisher:
python-publish.yml on 3735943886/rustuya-bridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrustuyabridge-0.2.0rc6-cp39-abi3-win_amd64.whl -
Subject digest:
24e174cd3a3311282dc3c19a8d330a6f4df7338b6918d9797b5575c8aca26c49 - Sigstore transparency entry: 1700513310
- Sigstore integration time:
-
Permalink:
3735943886/rustuya-bridge@91ee6d84ebc3afb99bd2f5b5524c1612ab28cde6 -
Branch / Tag:
refs/tags/py-v0.2.0-rc.6 - Owner: https://github.com/3735943886
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@91ee6d84ebc3afb99bd2f5b5524c1612ab28cde6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrustuyabridge-0.2.0rc6-cp39-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: pyrustuyabridge-0.2.0rc6-cp39-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.6 MB
- Tags: CPython 3.9+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5600607c03f3126df63436b2f94a790af9ae3799a66a09b51df45216cad100fd
|
|
| MD5 |
48ce8659854e0df017c733fc7a9c73b8
|
|
| BLAKE2b-256 |
4ede1eaed5efd691bcc92a7ac0af4b0d296747f306fa6b666de98bfde569c9fe
|
Provenance
The following attestation bundles were made for pyrustuyabridge-0.2.0rc6-cp39-abi3-musllinux_1_2_x86_64.whl:
Publisher:
python-publish.yml on 3735943886/rustuya-bridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrustuyabridge-0.2.0rc6-cp39-abi3-musllinux_1_2_x86_64.whl -
Subject digest:
5600607c03f3126df63436b2f94a790af9ae3799a66a09b51df45216cad100fd - Sigstore transparency entry: 1700513320
- Sigstore integration time:
-
Permalink:
3735943886/rustuya-bridge@91ee6d84ebc3afb99bd2f5b5524c1612ab28cde6 -
Branch / Tag:
refs/tags/py-v0.2.0-rc.6 - Owner: https://github.com/3735943886
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@91ee6d84ebc3afb99bd2f5b5524c1612ab28cde6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrustuyabridge-0.2.0rc6-cp39-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: pyrustuyabridge-0.2.0rc6-cp39-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.9+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0f3c2f7e87b6c9fc2b5363649058bb8b47385bb7b7355f23e9794823b56b62e
|
|
| MD5 |
cb2a164fcdabd862e44a957a8d2d317c
|
|
| BLAKE2b-256 |
b552b07e8a849710bd479e9dd0d27c6c8c0bcce74ebb09610ec7ef7a535d344f
|
Provenance
The following attestation bundles were made for pyrustuyabridge-0.2.0rc6-cp39-abi3-musllinux_1_2_aarch64.whl:
Publisher:
python-publish.yml on 3735943886/rustuya-bridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrustuyabridge-0.2.0rc6-cp39-abi3-musllinux_1_2_aarch64.whl -
Subject digest:
f0f3c2f7e87b6c9fc2b5363649058bb8b47385bb7b7355f23e9794823b56b62e - Sigstore transparency entry: 1700513300
- Sigstore integration time:
-
Permalink:
3735943886/rustuya-bridge@91ee6d84ebc3afb99bd2f5b5524c1612ab28cde6 -
Branch / Tag:
refs/tags/py-v0.2.0-rc.6 - Owner: https://github.com/3735943886
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@91ee6d84ebc3afb99bd2f5b5524c1612ab28cde6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrustuyabridge-0.2.0rc6-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pyrustuyabridge-0.2.0rc6-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
007bf411c8ecc37f93bd070cb488c47d3bbf0165f7a973ee0d7cc3e7170f2abc
|
|
| MD5 |
5477515cd3ac01837ec0300420b3967a
|
|
| BLAKE2b-256 |
a967b4963807d5dd56916130ed625c60768c12c386206e4320058ccd0a7bebdc
|
Provenance
The following attestation bundles were made for pyrustuyabridge-0.2.0rc6-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
python-publish.yml on 3735943886/rustuya-bridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrustuyabridge-0.2.0rc6-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
007bf411c8ecc37f93bd070cb488c47d3bbf0165f7a973ee0d7cc3e7170f2abc - Sigstore transparency entry: 1700513304
- Sigstore integration time:
-
Permalink:
3735943886/rustuya-bridge@91ee6d84ebc3afb99bd2f5b5524c1612ab28cde6 -
Branch / Tag:
refs/tags/py-v0.2.0-rc.6 - Owner: https://github.com/3735943886
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@91ee6d84ebc3afb99bd2f5b5524c1612ab28cde6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrustuyabridge-0.2.0rc6-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: pyrustuyabridge-0.2.0rc6-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.2 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b49e0aa629f950ab42e3d0f84bffa615ce8b75cca891759acae7129e3d5ac49
|
|
| MD5 |
f196812b69b4e2f451e261e461f0cccc
|
|
| BLAKE2b-256 |
864e85e9a7984e294ffffd6e15bdb835e092fd1be500964f5484fd7a5e469ade
|
Provenance
The following attestation bundles were made for pyrustuyabridge-0.2.0rc6-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
python-publish.yml on 3735943886/rustuya-bridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrustuyabridge-0.2.0rc6-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
5b49e0aa629f950ab42e3d0f84bffa615ce8b75cca891759acae7129e3d5ac49 - Sigstore transparency entry: 1700513297
- Sigstore integration time:
-
Permalink:
3735943886/rustuya-bridge@91ee6d84ebc3afb99bd2f5b5524c1612ab28cde6 -
Branch / Tag:
refs/tags/py-v0.2.0-rc.6 - Owner: https://github.com/3735943886
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@91ee6d84ebc3afb99bd2f5b5524c1612ab28cde6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrustuyabridge-0.2.0rc6-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: pyrustuyabridge-0.2.0rc6-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba9931c31317f0daec5675a2b988fe0bd098dd4b01330427f9f2d94dfe389774
|
|
| MD5 |
3475c5a916a78828c7d150af3ab26311
|
|
| BLAKE2b-256 |
4dee50fc3e2409f550052392671c915382d8880a9c7ab159e4d3abc81b1be2af
|
Provenance
The following attestation bundles were made for pyrustuyabridge-0.2.0rc6-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
python-publish.yml on 3735943886/rustuya-bridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrustuyabridge-0.2.0rc6-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
ba9931c31317f0daec5675a2b988fe0bd098dd4b01330427f9f2d94dfe389774 - Sigstore transparency entry: 1700513313
- Sigstore integration time:
-
Permalink:
3735943886/rustuya-bridge@91ee6d84ebc3afb99bd2f5b5524c1612ab28cde6 -
Branch / Tag:
refs/tags/py-v0.2.0-rc.6 - Owner: https://github.com/3735943886
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@91ee6d84ebc3afb99bd2f5b5524c1612ab28cde6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrustuyabridge-0.2.0rc6-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: pyrustuyabridge-0.2.0rc6-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 2.2 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47ec40223daa0bfa92785b566e48a8bfb9112dfffdfa5d42613011c3bf5f50b9
|
|
| MD5 |
8208c50ebbc3728c18c0653817d1d2bc
|
|
| BLAKE2b-256 |
5b357e21da43b06bb99489384eedbbb8d54b87cef4763923f8f83bed6ed906ef
|
Provenance
The following attestation bundles were made for pyrustuyabridge-0.2.0rc6-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
python-publish.yml on 3735943886/rustuya-bridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrustuyabridge-0.2.0rc6-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
47ec40223daa0bfa92785b566e48a8bfb9112dfffdfa5d42613011c3bf5f50b9 - Sigstore transparency entry: 1700513322
- Sigstore integration time:
-
Permalink:
3735943886/rustuya-bridge@91ee6d84ebc3afb99bd2f5b5524c1612ab28cde6 -
Branch / Tag:
refs/tags/py-v0.2.0-rc.6 - Owner: https://github.com/3735943886
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@91ee6d84ebc3afb99bd2f5b5524c1612ab28cde6 -
Trigger Event:
push
-
Statement type: