~ashkeel/kilovolt-client-python

Experimental Kilovolt client for python projects
Create python-publish.yml
better import format

clone

read-only
https://git.sr.ht/~ashkeel/kilovolt-client-python
read/write
git@git.sr.ht:~ashkeel/kilovolt-client-python

You can also use your local clone with git send-email.

#Kilovolt client

Python client for Kilovolt servers, supports Kilovolt Protocol v9+

#Getting started

pip install kilovolt (on PyPI)

#Example usage

import asyncio
import os
from kilovolt import KilovoltClient


async def connect():
    kv = KilovoltClient("ws://localhost:4337/ws", os.getenv("KILOVOLT_PASSWORD"))
    await kv.connect()

    # Subscribe to key
    await kv.subscribe("twitch/ev/message", lambda key, val: print(val))
    
    # List all keys that begin with "twitch"
    print(await kv.list("twitch"))

asyncio.run(connect())

#LICENSE

Kilovolt client is licensed under ISC, see LICENSE for more details.