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.2.0.tar.gz (21.2 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.2.0-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: harreither_brain_client-0.2.0.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for harreither_brain_client-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9ad32beb2a07ae648472cef7382ce89218a54145c6baa06b40a46daf4747f1a8
MD5 f7837c9ae9109e3e743be994689f4c0d
BLAKE2b-256 e289bd9f6981330b6c59c92e580b7b2d150c879dfa8ce791f788458c0ad849b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for harreither_brain_client-0.2.0.tar.gz:

Publisher: python-publish.yml on andraztori/harreither-brain-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for harreither_brain_client-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb67d355e9e4e6651df2c7b8e08d9d3d3278a512b3dda2a9a3ed4d0cb8a05b30
MD5 38fb7985029908f70c751af0a56f257f
BLAKE2b-256 a9df83b4506a0d4fb2e719fd79893d8ab97518ee91ddaf94dc1406d9b8ea94ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for harreither_brain_client-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on andraztori/harreither-brain-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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