Metadata-Version: 2.1
Name: gosundpy
Version: 0.6.0
Summary: Python API for controling Gosund smart devices
Home-page: https://github.com/purple4reina/gosundpy
Author: Rey Abolofia
Author-email: purple4reina@gmail.com
License: MIT
Project-URL: Source, https://github.com/purple4reina/gosundpy
Project-URL: Bug Tracker, https://github.com/purple4reina/gosundpy/issues
Keywords: gosund,smartlife,tuya,iot,api,sdk,python
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.7, <4
Description-Content-Type: text/markdown
License-File: LICENSE

# gosundpy

[![PyPI version](https://badge.fury.io/py/gosundpy.svg)](https://badge.fury.io/py/gosundpy)
![PyPI - Downloads](https://img.shields.io/pypi/dm/gosundpy)

Control your Gosund smart devices via python code.

## Install

```bash
pip install gosundpy
```

## Prerequisites

In order to control your devices, you must register your devices using the Tuya
Smart app ([ios][1]/[android][2]) and create a new Cloud Project in the Tuya
IoT Platform.

## Usage

```python
import time

from gosundpy import Gosund

gosund = Gosund('username', 'password', 'access_id', 'access_key')

commands = ['turn_off', 'turn_on', 'turn_off', 'switch', 'switch', 'turn_off']

switch = gosund.get_device('12345')
for cmd in commands:
    getattr(switch, cmd)()
    time.sleep(1)

lightbulb = gosund.get_device('67890')
for cmd in commands:
    getattr(lightbulb, cmd)()
    time.sleep(1)
```

<!-- links -->
[1]: https://apps.apple.com/us/app/tuya-smart/id1034649547
[2]: https://play.google.com/store/apps/details?id=com.tuya.smart&hl=en_US&gl=US
