Skip to main content

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

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tuya-iot-py-sdk-0.6.6.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tuya_iot_py_sdk-0.6.6-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file tuya-iot-py-sdk-0.6.6.tar.gz.

File metadata

  • Download URL: tuya-iot-py-sdk-0.6.6.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for tuya-iot-py-sdk-0.6.6.tar.gz
Algorithm Hash digest
SHA256 4764be929c967bcc1e24daad1dd4d852d2a9665df5410c0117c150853e44e057
MD5 a30308055ed0147b69f374679dc3d17b
BLAKE2b-256 ad3251f5b7a9992c00f5857c272c1dce82216c0543232fcaffacfa5865d5da90

See more details on using hashes here.

File details

Details for the file tuya_iot_py_sdk-0.6.6-py3-none-any.whl.

File metadata

  • Download URL: tuya_iot_py_sdk-0.6.6-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for tuya_iot_py_sdk-0.6.6-py3-none-any.whl
Algorithm Hash digest
SHA256 41c99f721a9a92fd828886a00bd7e96362a79bd3260832c32ec3ad9f212db95f
MD5 14603e78955322d13bdaca25447902ae
BLAKE2b-256 0892750c0ba363dcda0fee98b5df6b6e43e4a9d9587d4674a1f684d6a26e63b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page