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:
- Provide your GlueHome username and password to
GlueAuth
to generate an API key. - 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gluehome-0.1.1.tar.gz
.
File metadata
- Download URL: gluehome-0.1.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ea4aaee000a7dfbdc020b79b34a004833c34851351e80eac76e91a479152d97 |
|
MD5 | 0ab68cd64c0d7f78f6bf9acfc06be8dc |
|
BLAKE2b-256 | d76b7f124e5d3536c68d7ea6ea38ef460cd29cf5ebc2c4df08b1b4d64ed47693 |
File details
Details for the file gluehome-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: gluehome-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6d0109ddefcca08f3e781cae5c2e57491d7c9012f1a4ca47dd693d929af4f4c |
|
MD5 | c3004f0f16284ad7258c6b4001dcd20d |
|
BLAKE2b-256 | 876fd5552d4ba2fd4cf60cd1605b8007a506508150cfc74e63918e8f2fc9f07b |