A websocket library
Project description
asyncwebsockets is an anyio-compatible websocket client library. Thus it works with curio, trio, or asyncio.
Installation
To install the latest stable version:
$ pip install asyncwebsockets
To install the latest development version:
$ pip install git+https://github.com/Fuyukai/asyncwebsockets.git#egg=asyncwebsockets
Basic Usage
import anyio
import asyncwebsockets
async def test():
async with asyncwebsockets.open_websocket("wss://echo.websocket.org") as ws:
await ws.send("test")
evt = await ws.next_event()
print(type(evt), getattr(evt, 'data', None))
anyio.run(test)
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
asyncwebsockets-0.9.3.tar.gz
(13.1 kB
view hashes)
Built Distribution
Close
Hashes for asyncwebsockets-0.9.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72eb780c812b451f2450a98dbf3e2c2f1c366ea0323307e5a67eaeb1e90d1af6 |
|
MD5 | d2c6b0ec02f47bec69dad95cc5d1a63e |
|
BLAKE2b-256 | 78cfee87e2bd7ea77b03d8d728fbddf4cbc3092fa32f5b02fead052ef14121e9 |