skillfed

tuya-device-sharing-sdk

A Python sdk for Tuya Open API, which provides IoT capabilities, maintained by Tuya official

tuya-device-sharing-sdk v0.2.14 134.2K downloads/30d#11,482 on PyPI44
Permissive license MIT Active released

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-sdk

uv

uv add tuya-device-sharing-sdk

poetry

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 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

Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development

Tags

tuya iot device managementtuya open api sdksmart home device controlmqtt device communicationtuya scene automation
iotmqtttuya

More Software Development packages