Skip to main content

Util for create websocket client(s) quickly

Project description

websockets-assistant

How to use it

from websockets_assistant import client, start, sleep

async def hello(ws):
    await ws.send("hello")
    await sleep(1)
    await ws.send("websocket")
    await sleep(0.1)
    await ws.close()

async def main():
    client("wss://echo.websocket.org/", print, hello, True)
    client("wss://echo.websocket.org/", print, hello, True)
    for i in range(5, 0, -1):
        print(i)
        await sleep(1)

start(main())

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

websockets-assistant-2.7.tar.gz (2.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page