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.4.tar.gz
(13.0 kB
view hashes)
Built Distribution
Close
Hashes for asyncwebsockets-0.9.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1d82fbcbd016cd0811630f44b27bbe3b6e2369b157970517bebf945f6e6b2ea |
|
MD5 | 74ecd0b8fb2313dc4220b58f409cf8c7 |
|
BLAKE2b-256 | da9dab76dd06f03b09493a5046ef31fee5e20cf868b0a1b48a9f325628db32a1 |