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-1.2.0.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for switchbot_api-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6318c4bd29624188255d9ba4ae1fb5605bbe0c78da6121803bc9c151c01a9010 |
|
MD5 | d407c02763f408362fbb23061eeff8f4 |
|
BLAKE2b-256 | 7d1afa77443b4ee332957cc35df51f84f6199498ec927113b96fd7ff3759453d |