{"id":34096378,"url":"https://github.com/mrtxee/tuyacloud","last_synced_at":"2026-05-28T12:32:10.722Z","repository":{"id":65944724,"uuid":"567683471","full_name":"mrtxee/tuyacloud","owner":"mrtxee","description":"Tuya Cloud Client Python package based on http-API for Tuya IoT Development Platform","archived":false,"fork":false,"pushed_at":"2023-03-01T16:17:03.000Z","size":211,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-16T19:52:11.606Z","etag":null,"topics":["iot","python","smarthome","tuya","tuya-api","tuya-devices","tuya-iot","tuya-smart"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrtxee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-18T10:33:10.000Z","updated_at":"2023-02-17T22:13:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"2bc31265-613d-4f33-a654-82fc5e3bd190","html_url":"https://github.com/mrtxee/tuyacloud","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mrtxee/tuyacloud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtxee%2Ftuyacloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtxee%2Ftuyacloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtxee%2Ftuyacloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtxee%2Ftuyacloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrtxee","download_url":"https://codeload.github.com/mrtxee/tuyacloud/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtxee%2Ftuyacloud/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33609237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["iot","python","smarthome","tuya","tuya-api","tuya-devices","tuya-iot","tuya-smart"],"created_at":"2025-12-14T15:34:52.116Z","updated_at":"2026-05-28T12:32:10.716Z","avatar_url":"https://github.com/mrtxee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tuya Cloud Client\nTuya Cloud Client Python package based on http-API for [Tuya IoT Development Platform](https://developer.tuya.com/en/docs/iot). TuyaCloudClient provides full fuctionality for remote manipulation with Tuya IoT platform based smart devices.\n\n# Overview\nTuya Cloud Client implies quick client functionality for an easy interaction with Tuya services. Most suitable for building software with Tuya API integrated services.\n\nMajor fuctionality of Tuya Cloud Client package is based on two classes: **TuyaCloudClient \u0026 TuyaCloudClientNicer**. TuyaCloudClientNicer is an extension over TuyaCloudClient. It provides just the same methods, but brings  more significant data in responses, cleaned from meta. Usage of TuyaCloudClientNicer class is preferable for the most cases. \n\n## Functionality\nIntuitive functional interface of a service object\n - get_user_homes()\n - get_user_devices()\n - get_device_information(device_id:uuid)\n - get_device_details(device_id:uuid)\n - get_device_functions(device_id:uuid)\n - get_device_specifications(device_id:uuid)\n - get_device_status(device_id:uuid)\n - get_device_logs(device_id:uuid)\n - get_home_data(home_id:int)\n - get_home_rooms(home_id:int)\n - get_home_devices(home_id:int)\n - get_home_members(home_id:int)\n - get_room_devices(home_id:int, room_id:int)\n - get_category_list()\n - get_category_instruction(category:str)\n - exec_device_command(device_id:uuid, commands:JSON)\n\n## Installation\n\n    python3 -m pip install tuyacloud\n\n## Getting started\nOOP based package\n\n### Initiation of an object\n    tcc = tuyacloud.TuyaCloudClientNicer(\n        ACCESS_ID       = 'XXXXXXXXXXXXXX',\n        ACCESS_SECRET   = 'XXXXXXXXXXXXXX',\n        UID             = 'XXXXXXXXXXXXXX',\n        ENDPOINT_URL    = 'XXXXXXXXXXXXXX'\n    )\n\nCredentials **ACCESS_ID, ACCESS_SECRET, UID** could be claimed at [iot.tuya.com](https://iot.tuya.com). **ENDPOINT_URL** is to be chosen by user from \n\n#### List of tuya endpoints:\n    Availability zone\tEndpoint\n    America\t            openapi.tuyaus.com\n    China\t            openapi.tuyacn.com\n    Europe\t            openapi.tuyaeu.com\n    India\t            openapi.tuyain.com\n    Eastern America\t    openapi-ueaz.tuyaus.com\n    Western Europe\t    openapi-weaz.tuyaeu.com\n\n### Getting data from tuya endpoint, example\nCall methods\n\n    homes = tcc.get_user_homes()\n    print(homes)\n    \nGet response\n\n    [\n        {\n            \"geo_name\": \"Hong-Kong, Main str. 2716\",\n            \"home_id\": 1490003,\n            \"lat\": 00.460004060004,\n            \"lon\": 00.219918549988,\n            \"name\": \"Bachelor Condo\",\n            \"role\": \"OWNER\"\n        },\n        ...\n    ]\n### Execute command over device, example\nCall methods\n\n    device_uuid = \"3217xxxxxxxxxxx\"\n    commands = []\n    commands.append({\n        \"code\": \"switch_led_1\",\n        \"value\": True\n    })\n    exec_result = tcc.exec_device_command(device_uuid, {\"commands\": commands})\n    print(exec_result)\n\nGet response\n\n    {\n        \"result\": True,\n        \"success\": True,\n        \"t\": 1676636545787,\n        \"tid\": \"bcc21939aebd11ed838e2a0aa76353ad\"\n    }\n\n### Use built-in logger functionality, example\nYou may capture logs by setting logger with id **tuyacloud.TuyaCloudClient** like so\n\n    def setup_logger():\n        logger_formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')\n        logger_file_handler = logging.handlers.RotatingFileHandler('tuyacloud.log', maxBytes=51200, backupCount=2)\n        logger_file_handler.setLevel(logging.DEBUG)\n        logger_file_handler.setFormatter(logger_formatter)\n        logger_tuya_cloud_client = logging.getLogger('tuyacloud.TuyaCloudClient')\n        logger_tuya_cloud_client.setLevel(logging.DEBUG)\n        logger_tuya_cloud_client.addHandler(logger_file_handler)\n        logger_tuya_cloud_client.info(\"script started\")\n    setup_logger()\n\n## Links\nFor more info see [github.com/mrtxee/tuyacloud](https://github.com/mrtxee/tuyacloud), \nPYPI [pypi.org/project/tuyacloud](https://pypi.org/project/tuyacloud/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtxee%2Ftuyacloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrtxee%2Ftuyacloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtxee%2Ftuyacloud/lists"}