Skip to content

Repository files navigation

Haven Lighting API Client

A Python client library for interacting with the Haven Lighting API.

Installation

pip install havenlighting

Usage

fromhavenlightingimportHavenClient# Initialize the clientclient=HavenClient()
# Authenticateauthenticated=client.authenticate(
email="your-email@example.com",
password="your-password"
)
ifauthenticated:
# Discover locationslocations=client.discover_locations()
# Print available locations and lightsforlocation_id, locationinlocations.items():
print(f"Location: {location.name}")
# Get lights for this locationlights=location.get_lights()
# Control lightsforlight_id, lightinlights.items():
print(f"Light: {light.name}")
light.turn_on() # Turn light onlight.turn_off() # Turn light off

Development

  1. Clone the repository
  2. Copy .env.example to .env and fill in your credentials:
cp .env.example .env
  1. Install development dependencies:
pip install -e ".[dev]"
  1. Run tests:
pytest

License

MIT License - see LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages