Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Util for create websocket client(s) quickly

Project description

websockets-assistant

How to use it

from websockets_assistant import client, run, sleep

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

# test 1
async def main():
    await asyncio.gather(
        client("wss://echo.websocket.org/", log, hello, True),
        client("wss://echo.websocket.org/", log, hello, True),
        client("wss://echo.websocket.org/", log, hello, True),
    )
run(main)

# test 2
def main():
    client("wss://echo.websocket.org/", log, hello, True),
    client("wss://echo.websocket.org/", log, hello, True),
run(main)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for websockets-assistant, version 2.8
Filename, size File type Python version Upload date Hashes
Filename, size websockets-assistant-2.8.tar.gz (2.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page