Skip to main content

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

Project description

Tuya Device Sharing SDK

A Python sdk for Tuya Open API, which provides basic IoT capabilities like device management capabilities, helping you create IoT solutions. With diversified devices and industries, Tuya IoT 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

APIs

  • Manager
    • update_device_cache
    • refresh_mq
    • send_commands
    • get_device_stream_allocate
    • query_scenes
    • trigger_scene
    • add_device_listener
    • remove_device_listener
    • unload
  • CustomerApi
    • get
    • post
    • put
    • delete
  • SharingMQ
    • start
    • stop
    • add_message_listener
    • remove_message_listener
  • DeviceRepository
    • query_devices_by_home
    • query_devices_by_ids
    • send_commands
  • HomeRepository
    • query_homes
    • query_room_by_device
  • SceneRepository
    • query_scenes
    • trigger_scene

Possible scenarios

Usage

Release Note

version Description
0.1.8 fix topic error
0.1.9 fix mq link id
0.2.0 MQTT bulk subscription
0.2.1 add updated_status_properties to SharingDeviceListener
0.2.2 add timestamp to SharingDeviceListener
0.2.3 fix paho-mqtt dependency
0.2.4 fix asbtract decorator
0.2.5 handle unknown dpid in_on_device_report #39
0.2.6 Cancel MQTT reconnect on stop #37
0.2.8 Add report_type to device status #51
0.2.9 Fix incorrect type hint in DeviceFunction #44
Add pre-commit workflow #46
Apply ruff format #47
0.2.10 Make enum mapping lookups case-insensitive #55
Add ruff-check to pre-commit #56
Add ApiRequestException for failed API responses #58
Fix 0.2.9 changelog formatting #59
0.2.11 Add query_room_by_device to query the room a device belongs to
0.2.12 Add custom code type validation to disable local reporting when custom-type is enabled #68

Installation

pip3 install tuya-device-sharing-sdk

Issue feedback

You can provide feedback on your issue via Github Issue.

License

tuya-device-sharing-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_device_sharing_sdk-0.2.12.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

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

tuya_device_sharing_sdk-0.2.12-py3-none-any.whl (39.8 kB view details)

Uploaded Python 3

File details

Details for the file tuya_device_sharing_sdk-0.2.12.tar.gz.

File metadata

File hashes

Hashes for tuya_device_sharing_sdk-0.2.12.tar.gz
Algorithm Hash digest
SHA256 7ba0ad0225982ac4f9b4aaa8dcff0200cbb1a08d27cd016d796c0c1333611885
MD5 2e49ec9b10f200713f56a8061480dd04
BLAKE2b-256 5e2cb2aa0bde373d16892a07ef848a312c40a7b05abf6155fe3f8cd938cd0a5d

See more details on using hashes here.

File details

Details for the file tuya_device_sharing_sdk-0.2.12-py3-none-any.whl.

File metadata

File hashes

Hashes for tuya_device_sharing_sdk-0.2.12-py3-none-any.whl
Algorithm Hash digest
SHA256 7bb9015fe59295feaa5b189bb43850900e45aa37c9954f464dc0216a56e5b299
MD5 b7db55e7d6f0c83ff1d7b8d73c71e88b
BLAKE2b-256 5ec3f2ae17c331e5f100db6490c1fded832d892928070ffd9b76d107ee6836e6

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