Hivemind Websocket Client
Project description
Hivemind Websocket Client
Install
pip install hivemind_bus_client
Usage
from time import sleep
from mycroft_bus_client import Message
from hivemind_bus_client import HiveMessageBusClient
from hivemind_bus_client.decorators import on_escalate, \
on_shared_bus, on_ping, on_broadcast, on_propagate, on_mycroft_message, \
on_registry_opcode, on_third_party, on_cascade, on_handshake, on_hello, \
on_rendezvous, on_hive_message, on_third_party, on_payload
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
File details
Details for the file hivemind_bus_client-0.0.3a2.tar.gz
.
File metadata
- Download URL: hivemind_bus_client-0.0.3a2.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/3.10.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a558d6176f11c03380c9b33c74d54d5eb650b2cb9b41aec58d5a1e4980be1bb |
|
MD5 | 60249a245586369911fe26752359ad53 |
|
BLAKE2b-256 | df455ed4029ff98abacf5ca07fca45dd80f9edadb1646c9e3f42add1acbf81f4 |