A Python library for the (unofficial) Wyze Labs web APIs.
This project is used by the ha-wyzeapi project. Let me know if you are utilizing it so that I can feature your project here!
Getting logged in:
import asyncio
from wyzeapy import Wyzeapy
async def async_main():
client = await Wyzeapy.create()
await client.login("EMAIL", "PASSWORD")
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(async_main())
- @shauntarves: for contributing the App ID and Signing Secret
- @yoinx: for considerable contributions to the project
Developed by Katie Mulliken (SecKatie)
This project uses Python's built-in unittest
framework with coverage
for code coverage reporting.
First, install the development dependencies:
uv sync --group dev
Run all tests:
.venv/bin/python -m unittest discover tests
Run tests with verbose output:
.venv/bin/python -m unittest discover tests -v
Run a specific test file:
.venv/bin/python -m unittest tests.test_camera_service
Run a specific test method:
.venv/bin/python -m unittest tests.test_camera_service.TestCameraService.test_get_cameras
Run tests with coverage:
.venv/bin/coverage run -m unittest discover tests
View coverage report in terminal:
.venv/bin/coverage report -m
Generate HTML coverage report:
.venv/bin/coverage html
Then open htmlcov/index.html
in your web browser to view the detailed coverage report.
One-liner to run tests and view coverage:
.venv/bin/coverage run -m unittest discover tests && .venv/bin/coverage report -m
Docs are generated using pdoc. To generate docs for this project, run:
# Install development dependencies
uv sync --group dev
# Generate docs
uv run pdoc --output-dir=docs src/wyzeapy