Skip to main content

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

  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.

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.3.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

havenlighting-0.1.3-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file havenlighting-0.1.3.tar.gz.

File metadata

  • Download URL: havenlighting-0.1.3.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

Hashes for havenlighting-0.1.3.tar.gz
Algorithm Hash digest
SHA256 73820c18807b8a4566c601235a9df7c44e28bab58a7c98d624ec500f2af2a0a2
MD5 c98afabcf64fce2c893a917e71da0e5a
BLAKE2b-256 91072e4d8e2e97d4f16ba1c0d6615918ed95f17a8bd5d1fa2ef5202e3da08ae1

See more details on using hashes here.

File details

Details for the file havenlighting-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: havenlighting-0.1.3-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

Hashes for havenlighting-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2c17c0d08586b1a68f676a66dc9aa41894d5a51d5018301daa6caf639f5c9469
MD5 3908e3dc71afe8bf5577b432aa03f353
BLAKE2b-256 4514f108ffa41fee0600aa26c11c06cbbb9bcc65751bd26ec6f3bdd70a9d537e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page