Skip to main content

Tuya IoT Python SDK

PyPI

PyPI - Downloads

PyPI - Python Version

A Python sdk for Tuya Open API, which provides basic IoT capabilities like device management, asset management and industry capabilities, helping you create IoT solutions. With diversified devices and industries, Tuya Cloud Development Platform opens basic IoT capabilities like device management, AI scenarios, and data analytics services, as well as industry capabilities, helping you create IoT solutions.

Features

Base APIs

  • TuyaOpenAPI

    • connect
    • is_connect
    • get
    • post
    • put
    • delete
  • TuyaOpenMQ

    • start
    • stop
    • add_message_listener
    • remove_message_listener

APIs

  • TuyaDeviceListener
    • update_device
    • add_device
    • remove_device

Device control

  • TuyaDeviceManager
    • update_device_list_in_smart_home
    • update_device_caches
    • update_device_function_cache
    • add_device_listener
    • remove_device_listener
    • get_device_info
    • get_device_list_info
    • remove_device
    • remove_device_list
    • get_factory_info
    • factory_reset
    • get_device_status
    • get_device_list_status
    • get_device_functions
    • get_category_functions
    • get_device_specification
    • send_commands

Home

  • TuyaHomeManager
    • update_device_cache
    • query_scenes
    • trigger_scene
    • query_infrared_devices
    • trigger_infrared_commands

Assets

  • TuyaAssetManager
    • get_device_list
    • get_asset_info
    • get_asset_list

Possible scenarios

Prerequisite

Registration

Please check Tuya IoT Platform Configuration Guide to register an account on the Tuya IoT Platform, and get the required information. You need to create a Cloud project and complete the configuration of asset, user, and application. Then, you will get the username, password, Access ID, and Access Secret.

Usage

Installation

pip3 install tuya-iot-py-sdk

Sample code

OpenAPI Sample

Open IoT Hub Sample

Tuya Open API reference

Tuya opens up a variety of APIs covering business scenarios such as device pairing, smart home management, device control, and scene automation. You can call APIs according to API integration documents to implement applications.

For more information, see the documentation.

Issue feedback

You can provide feedback on your issue via Github Issue or Technical Ticket.

License

tuya-iot-py-sdk is available under the MIT license. Please see the LICENSE file for more info.

Metadata

Release files for tuya-iot-py-sdk 0.6.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tuya-iot-py-sdk 0.6.6
File Size Uploaded Provenance Actions
tuya-iot-py-sdk-0.6.6.tar.gz 17.0 kB Without provenance Details for tuya-iot-py-sdk-0.6.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tuya-iot-py-sdk 0.6.6
File Interpreter ABI Platform Actions
tuya_iot_py_sdk-0.6.6-py3-none-any.whl Python 3 none any Details for tuya_iot_py_sdk-0.6.6-py3-none-any.whl

Total release size: 34.9 kB

Release files / tuya-iot-py-sdk-0.6.6.tar.gz

Download URL tuya-iot-py-sdk-0.6.6.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4764be929c967bcc1e24daad1dd4d852d2a9665df5410c0117c150853e44e057
BLAKE2b-256 checksum
How to use checksums
ad3251f5b7a9992c00f5857c272c1dce82216c0543232fcaffacfa5865d5da90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.6

Release files / tuya_iot_py_sdk-0.6.6-py3-none-any.whl

Download URL tuya_iot_py_sdk-0.6.6-py3-none-any.whl
Size 17.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
41c99f721a9a92fd828886a00bd7e96362a79bd3260832c32ec3ad9f212db95f
BLAKE2b-256 checksum
How to use checksums
0892750c0ba363dcda0fee98b5df6b6e43e4a9d9587d4674a1f684d6a26e63b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.6

Security for tuya-iot-py-sdk 0.6.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page