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.2.1.tar.gz
(8.5 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.2.1.tar.gz.
File metadata
- Download URL: havenlighting-0.2.1.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c14ed8c38af7dc0728a7e995b32be3fd1449c0ffe3f8b52c21b479875185137f
|
|
| MD5 |
dc3d4fc2f2a4cd78f336dff78dbda107
|
|
| BLAKE2b-256 |
1c86e7ab5ba9dbc9ad47e339b6b3c241a9947452ed160d4ac993d1058207b6f7
|
File details
Details for the file havenlighting-0.2.1-py3-none-any.whl.
File metadata
- Download URL: havenlighting-0.2.1-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7721f39152f192454435ea82c5d9167191c26afded36ebfb51e7c63a2c6863d3
|
|
| MD5 |
0d0b8fb9c6d1aaaa1fdad64c3ab93086
|
|
| BLAKE2b-256 |
002eef700b26c2a0047e3e80ae41ffa072ac58c7f29d7762d9a204a995b947d6
|