Metadata-Version: 2.1
Name: gluehome
Version: 0.1.2
Summary: A Python client for interacting with the Glue Home API.
Author-email: Fredrik Sundqvist <fsundqvist@gmail.com>
Maintainer-email: Fredrik Sundqvist <fsundqvist@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Fredrik Sundqvist
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/MadSpindel/gluehome-python/
Project-URL: Issues, https://github.com/MadSpindel/gluehome-python/issues
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests

# 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:

```bash
pip install gluehome
```

## Usage

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

```python
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](LICENSE) file for details.

## Disclaimer

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