An asynchronous library to use Switchbot API
Project description
py-switchbot-api
An asynchronous library to use Switchbot API. Allows to use both devices and remotes.
Usage
token = "xxx"
secret = "yyy"
client = SwitchBotAPI(token, secret)
print(await client.list_devices())
print(await client.get_status('some-id'))
await client.send_command('some-id', {COMMAND})
Development
Install
poetry install
Lint
poetry run black switchbot_api/
poetry run mypy switchbot_api/
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
switchbot_api-2.1.0.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for switchbot_api-2.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97192941b0861ff6ed382ecdfa9fd3b5b56de3cb83c112ea4c84d0eb860aaa32 |
|
MD5 | 26ef76f06c4291785cd3b8f1a6eda5e6 |
|
BLAKE2b-256 | 6499fad55eabb01ca2bb8840fdafff1ceb8dbc324f1fcdc9f3d66049ae8970d6 |