Hivemind Websocket Client
Project description
Hivemind Websocket Client
Install
pip install hivemind_bus_client==0.0.1a3
Usage
from time import sleep
from mycroft_bus_client import Message
from hivemind_bus_client import HiveMessageBusClient
from hivemind_bus_client.decorators import on_payload, on_escalate, \
on_shared_bus, on_ping, on_broadcast, on_propagate, on_mycroft_message, \
on_registry_opcode
key = "super_secret_access_key"
crypto_key = "ivf1NQSkQNogWYyr"
bus = HiveMessageBusClient(key, crypto_key=crypto_key, ssl=False)
bus.run_in_thread()
@on_mycroft_message(payload_type="speak", bus=bus)
def on_speak(msg):
print(msg.data["utterance"])
mycroft_msg = Message("recognizer_loop:utterance",
{"utterances": ["tell me a joke"]})
bus.emit_mycroft(mycroft_msg)
sleep(50)
bus.close()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for hivemind_bus_client-0.0.1a3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bffda94618f4b20621f8244b76427ff4a089533700610e186d710e50c4eb9d96 |
|
MD5 | 72c6edcd4c7f539c66e33aa0c3719567 |
|
BLAKE2b-256 | d10f7176c9babeec553f9c6c5ca3ad572e34ab26b79d65781f54628823813df7 |