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.2.0.tar.gz (8.5 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.2.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for havenlighting-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d8fc036be8c603ba8f578ba7d5bb7a19c14c152f6e28b41246f506888a03381e
MD5 d84bb40c5e6b0335dab83eefaa11acf8
BLAKE2b-256 4280aed9a286fb28c039531db220fc7f230483e11e937f15618d6add04810687

See more details on using hashes here.

File details

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

File metadata

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

Hashes for havenlighting-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b347f3def04f6463845a884a2c58ad341da14a30d8ca6be75cce7adc2d8cbad3
MD5 96e1bb77d1d7a613e8c3c850162818ba
BLAKE2b-256 0db46d13d09df620d9185940d3549c5032f2805044d24992f46a313a06060805

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