Wizpy
Install
pip install wizpy
How to use
Example:
import asyncio
from time import sleep
from wizPy import discover
from wizPy.light import Light
async def main():
for ip in await discover.discover():
light: Light = Light(ip)
light.off()
await light.apply()
print(f"light blinking: {ip}")
sleep(1)
light.on()
light.set_brightness(255)
await light.apply()
To set or get the state of an light, you need to create a Light object, with the IP of the light.
The light class has getter and setter to change the state of the light or get further information about it.
If you wanna apply changes, use apply() to send the updated state to the bulb.
To retrieve the IPs of the lights you can use the discover() method. If everything worked this method will return a list containing all the IPs as strings.
Metadata
Release files for wizpy 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wizpy-0.1.7.tar.gz | 3.7 kB | Details |
Release files / wizpy-0.1.7.tar.gz
| Download URL | wizpy-0.1.7.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e0aa3fdf539723df3e2c6523c2a2d74f2587811e071166a8b856ecace02a8a4
|
|
BLAKE2b-256 checksum How to use checksums |
ce0416112fd15667b179ca43ce86c2607c3630c05ba691f74ffc9b38a2d09613
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
|