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.3.0.tar.gz (21.5 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.3.0-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: harreither_brain_client-0.3.0.tar.gz
  • Upload date:
  • Size: 21.5 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.3.0.tar.gz
Algorithm Hash digest
SHA256 1479b5d86f7b6362b6da934ffa0d7bf7b226e57260991257d762d5dac6e3ee7e
MD5 c34efa9912307350514142d64cf85057
BLAKE2b-256 d516486d9af1c4da4799f06a82fb3245dd2268d8a12bccabf52ea62d4d81755c

See more details on using hashes here.

Provenance

The following attestation bundles were made for harreither_brain_client-0.3.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.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for harreither_brain_client-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e286a3b15a6dafda550100ada1dfe2b61a03d473fbad91aba042c2015382463e
MD5 fc78b11c5fb8dc3a4e5bfefd88b63540
BLAKE2b-256 433ff867a02c8198df0fed8afe9100316faa09c885900a7f5078f5ec588749c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for harreither_brain_client-0.3.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