Python client for Haven Lighting API
Project description
Haven Lighting API Client
A Python client library for interacting with the Haven Lighting API.
Installation
pip install havenlighting
Usage
from havenlighting import HavenClient
# Initialize the client
client = HavenClient()
# Authenticate
authenticated = client.authenticate(
email="your-email@example.com",
password="your-password"
)
if authenticated:
# Discover locations
locations = client.discover_locations()
# Print available locations and lights
for location_id, location in locations.items():
print(f"Location: {location.name}")
# Get lights for this location
lights = location.get_lights()
# Control lights
for light_id, light in lights.items():
print(f"Light: {light.name}")
light.turn_on() # Turn light on
light.turn_off() # Turn light off
Development
- Clone the repository
- Copy .env.example to .env and fill in your credentials:
cp .env.example .env
- Install development dependencies:
pip install -e ".[dev]"
- Run tests:
pytest
License
MIT License - see LICENSE file for details.
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
havenlighting-0.1.5.tar.gz
(7.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file havenlighting-0.1.5.tar.gz.
File metadata
- Download URL: havenlighting-0.1.5.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ccab30fd2c1cddd4246f07875be57e92b35517913bc72e49d34cad9766f5192
|
|
| MD5 |
90e58abcde432e4e98d4ccbfd1d8b3cb
|
|
| BLAKE2b-256 |
23252ad1b3ff8d435ce8bfe52d9c7fa954c192d3c6730e667a26a976798ec69c
|
File details
Details for the file havenlighting-0.1.5-py3-none-any.whl.
File metadata
- Download URL: havenlighting-0.1.5-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96b1b074021ce47822a4993b76455bd29f21e4e53ba318b9c1f7762e88c727a6
|
|
| MD5 |
9ce28c774a13a11a1262579cf3593301
|
|
| BLAKE2b-256 |
96a1eb24bb80aef5dfc849f098827e2154dc13123984084584ec0a8eefbe33dc
|