Metadata-Version: 2.4
Name: harreither-brain-client
Version: 0.2.0
Summary: Unofficial client library and CLI for Harreither Brain devices
Author: Andraz Tori
License: MIT License
        
        Copyright (c) 2026 Harreither Brain Client Contributors
        
        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/andraztori/harreither-brain-client
Project-URL: Repository, https://github.com/andraztori/harreither-brain-client
Keywords: harreither,client
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: websockets>=12.0
Requires-Dist: cryptography>=41.0
Dynamic: license-file

# Harreither Brain Client

Async Python client and CLI for talking to Harreither Brain websocket devices. It establishes the secure channel, authenticates with the device, and streams messages back and forth.

## Installation

```bash
pip install harreither-brain-client
```

Or from source:

```bash
pip install .
```

## CLI usage

```bash
harreither-brain \
  --host ws://device-host:8080 \
  --username YOUR_USERNAME \
  --password YOUR_PASSWORD \
  [--proxy] [--strict] [-v]
```

- `--proxy` routes through http://localhost:8080.
- `--strict` fails if the device sends unexpected fields to us.
- `-v` enables debug logging.

## Library usage

```python
import asyncio
from harreither_brain_client import Connection

async def main():
    conn = Connection(strict_mode=False)
    await conn.async_websocket_connect("ws://device-host:8080")
    await conn.establish_secure_connection()
    await conn.enqueue_authentication_flow(
        username="user",
        password="pass",
        auto_start_session=True,
    )
    await conn.messages_process()

asyncio.run(main())
```

## Development

- Run tests: `python -m unittest discover tests`
- Build artifacts: `python -m build`
- Check metadata: `python -m twine check dist/*`

## License

MIT
