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. 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.1.tar.gz (7.3 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.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: havenlighting-0.1.1.tar.gz
  • Upload date:
  • Size: 7.3 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.1.tar.gz
Algorithm Hash digest
SHA256 a6a6ad5d9d7a19b5714ad956bfced72b48597ec4448f6209d4d380e162fd28a4
MD5 7969a9e6a0523b4e443ca78cb9222c9c
BLAKE2b-256 c85200a348a47a9f09a359144ade1bde44318797cb31c325c05eece82a99bcfa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: havenlighting-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b7f5d14db321c392c4d6f58b4905d7d6748061884838b91dbf720f63b9f53d8d
MD5 c3f5f933c54e75d2f79d6e5f7f8826ab
BLAKE2b-256 d862e28ecf92c6f2e7ff71ee4610b184ca799828bd3909e8babde0aff8550d13

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