--- id: tuya-device-sharing-sdk version: "0.2.14" license: MIT license_treatment: permissive maintenance: active --- # tuya-device-sharing-sdk — A Python sdk for Tuya Open API, which provides IoT capabilities, maintained by Tuya official License: permissive · Maintenance: active · Downloads: 134.2K/mo ## 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 above — 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 pip install tuya-device-sharing-sdk uv add tuya-device-sharing-sdk poetry add tuya-device-sharing-sdk ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 134.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags tuya iot device management, tuya open api sdk, smart home device control, mqtt device communication, tuya scene automation, iot, mqtt, tuya [View on SkillFed](https://skillfed.io/packages/tuya-device-sharing-sdk) · [View on PyPI](https://pypi.org/project/tuya-device-sharing-sdk/)