Skip to main content

A Python client for interacting with the Glue Home API.

Project description

GlueHome Python Package

This Python package provides a client for interacting with the GlueHome API, allowing you to control and monitor your GlueHome smart locks.

Features

  • Authentication with GlueHome API
  • Retrieve information about all your locks
  • Get details for specific locks
  • Control locks (lock/unlock)

Installation

You can install the GlueHome package using pip:

pip install gluehome

Usage

Here's a quick example of how to use the GlueHome package:

from gluehome import GlueAuth, GlueClient

# Authenticate and get API key
auth = GlueAuth("your_username", "your_password")
api_key = auth.issue_api_key()

# Create a client
client = GlueClient(api_key)

# Get all locks
all_locks = client.get_all_locks()

# Get a specific lock
lock = client.get_lock("lock_id")

# Get multiple specific locks
locks = client.get_locks(["lock_id1", "lock_id2"])

# Control a lock
lock.lock()  # Lock the door
lock.unlock()  # Unlock the door

# Update lock information
lock.update()

# Get lock information
print(f"Lock: {lock.description}")
print(f"Status: {lock.connection_status}")
print(f"Battery: {lock.battery_status}%")
print(f"Last event: {lock.last_lock_event.event_type} at {lock.last_lock_event.event_time}")

Configuration

The package requires an API key for authentication. You can either:

  1. Provide your GlueHome username and password to GlueAuth to generate an API key.
  2. Use an existing API key directly with GlueClient.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This package is not officially associated with or endorsed by GlueHome.

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

gluehome-0.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

gluehome-0.1.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file gluehome-0.1.0.tar.gz.

File metadata

  • Download URL: gluehome-0.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for gluehome-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d972d7a293a8a649812b621ca4a7140e3679335e29805d5b202b06d139f39ffb
MD5 fc69ba62ae700e4b521e0584965afa0a
BLAKE2b-256 17d2b85034fd437581d725111394e4ae456976be61581b1b581adce6d244ffd6

See more details on using hashes here.

File details

Details for the file gluehome-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gluehome-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for gluehome-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c90d90bcbc4bbe7c77939a8f51e8b8f745b2cc16dc3e1f533f9eb541cbdc4e9f
MD5 0796b5ee79479249ae2f4b134662efb9
BLAKE2b-256 e091afb8eb4df41b3605b95d9beb179b1def7b603ab374b1e1accc6bc1f5a8cf

See more details on using hashes here.

Supported by

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