Skip to main content

Unofficial client library and CLI for Harreither Brain devices

Project description

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

pip install harreither-brain-client

Or from source:

pip install .

CLI usage

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

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

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

harreither_brain_client-0.1.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

harreither_brain_client-0.1.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: harreither_brain_client-0.1.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for harreither_brain_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b4d2e2e5adb90e7246f540325b474d1c931b7ede3164984bec92722c8b2e130b
MD5 3adaf02308dbfd5ba7dae0b26eb52b17
BLAKE2b-256 68dd861280cd4b13fd2c5b6e8035d7248b24c47a3e80d9669de0ee431267edd3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for harreither_brain_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ce02f2cda4c33db7724ca93c1f8b7c7457efc3c6512f5f34589430b7752ce79
MD5 9481bfdb15c7b55c71ecb83c713c67e7
BLAKE2b-256 ea0c9c4e952477b783018061c431d5576350e13216bff1e2765de47b15fbfc25

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