tuya-device-sharing-sdk
A Python sdk for Tuya Open API, which provides IoT capabilities, maintained by Tuya official
What it is and what it does
This is an official Tuya SDK that wraps their Open API to let you programmatically manage IoT devices, homes, and automation scenes. It provides a Manager class for high-level operations like sending commands and triggering scenes, repository classes for querying devices and homes, and a message queue interface for real-time device updates via MQTT. The SDK handles the underlying HTTP requests and MQTT subscriptions, so you work with Python objects rather than raw API calls.
The package depends on paho-mqtt for message queue connectivity and requests for HTTP communication. It supports Python 3.7 and newer, including PyPy. Recent versions have focused on stability—fixing MQTT reconnection issues and improving type hints. The active maintenance and low dependency count make it straightforward to integrate into existing Python projects.
Use it for:
- Build a Smart Life integration or custom dashboard that queries and controls Tuya devices across multiple homes
- Automate device commands and scene triggers based on external events or schedules
- Listen to real-time device status updates via MQTT to react to property changes
- Query device metadata and room assignments to organize and display device hierarchies
- Implement custom IoT workflows that combine device commands with business logic
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python SDK for Tuya's Open API that handles IoT device management, MQTT messaging, and scene automation through manager and repository interfaces.
Yes, if you are building on the Tuya platform. The SDK is actively maintained by Tuya, has no known vulnerabilities, low install friction, and a permissive MIT license. It is the official integration point for Tuya's Open API. Install it only if you have Tuya devices or a Tuya developer account to work with; it is not a general-purpose IoT library.
Install
tuya-device-sharing-sdk on PyPI
pip
pip install tuya-device-sharing-sdkuv
uv add tuya-device-sharing-sdkpoetry
poetry add tuya-device-sharing-sdkInstalling tuya-device-sharing-sdk
Before you install
Low install friction with only two runtime dependencies (paho-mqtt and requests). The package is actively maintained with a release 23 days ago and shows steady bug fixes across recent versions.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install tuya-device-sharing-sdk
from tuya_device_sharing_sdk import Manager
manager = Manager(api_client)
manager.send_commands(device_id, commands)
Requires valid Tuya API credentials and an initialized API client instance to instantiate Manager.
Verify before relying
- Whether the SDK requires Tuya API credentials or account setup beyond what pip install provides
- Performance characteristics when managing large numbers of devices or high-frequency MQTT messages
- Completeness of API coverage relative to the full Tuya Open API specification
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — paho-mqtt, requests |
| Maintenance | actively maintained — 23 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 134,209/month — #11,482 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tuya_device_sharing_sdk-0.2.14-py3-none-any.whl
Keywords: tuya, device, sdk, python
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
awsiotsdkConnects Python applications to AWS IoT Core…
permissive · top 5,000 on PyPI
HATasmotaParses and constructs Tasmota MQTT messages,…
permissive · top 15,000 on PyPI
tinytuyaControls and monitors Tuya WiFi smart devices…
permissive · top 15,000 on PyPI
meross-iotA Python library for controlling Meross IoT…
permissive · top 15,000 on PyPI
aioharmonyaioharmony is an asyncio library for…
permissive · top 15,000 on PyPI
azure-iot-deviceConnects Python applications to Azure IoT Hub…
permissive · top 15,000 on PyPI
pymammotionPyMammotion provides a Python API to control…
copyleft · top 15,000 on PyPI
azure-iot-hubProvides CRUD operations and service management…
permissive · top 15,000 on PyPI
tb-mqtt-clientPython client SDK for ThingsBoard IoT platform,…
permissive · top 15,000 on PyPI
deebot-clientA Python client library for controlling Ecovacs…
copyleft · top 15,000 on PyPI