pyGizwits
This package is a wrapper for Gizwits OpenAPI and websocket API. It allows you get connect using the App ID for the device type you have registered, then register for websocket updates for the devices you choose.
Credit to cdpuk as alot of the code has been inspired by https://github.com/cdpuk/ha-bestway
Example Usage
The below will login to the US api and get the devices currently bound to your devices. It will then fetch their current status as well as then subscribe to receive the websocket updates for the devices.
from pyGizwits import pyGizwits
from aiohttp import ClientSession
import asyncio
async def main()
username = 'youremailaddress'
password = 'yourpassword'
app_id = 'appidfromappyourdeviceisregisteredin'
session = ClientSession()
region = pyGizwits.GizwitsClient.Region.US
client = pyGizwits.GizwitsClient(session,app_id,region)
@client.on('device_status_update')
def handle_device_status_update(update):
print(f"Got Update")
print(update)
await client.login(username,password)
await client.refresh_bindings()
devices: dict[str, pyGizwits.GizwitsDeviceReport] = await client.fetch_devices()
for device in devices:
await client.Subscribe_to_device_updates(devices[device].device)
await asyncio.sleep(60)
await session.close()
asyncio.run(main())
Metadata
Release files for pyGizwits 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pygizwits-0.0.3.tar.gz | 10.8 kB | Without provenance | Details for pygizwits-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pygizwits-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for pygizwits-0.0.3-py3-none-any.whl |
Total release size: 21.7 kB
Release files / pygizwits-0.0.3.tar.gz
| Download URL | pygizwits-0.0.3.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48bda107fc3cba3681fdcb58552ea5cb121351dc9ceebe6fc5d2ec45800efaaa
|
|
BLAKE2b-256 checksum How to use checksums |
1bb0f8efe4a8d142da034d6b2f90740be0d3cec2491ca466d38835220207421e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.24.1
|
Release files / pygizwits-0.0.3-py3-none-any.whl
| Download URL | pygizwits-0.0.3-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28dfef3881d7aeda6f812dfc437f780b1e53853b260e34afbc6741c5b3dbc499
|
|
BLAKE2b-256 checksum How to use checksums |
7d800f0d3440c21ca8d3e888f417e5aea237d14cef344593126b6da637351ac5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.24.1
|
Security for pyGizwits 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.