Skip to main content

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)

Uploaded Source

Built Distribution

switchbot_api-2.1.0-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page