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.7.1.tar.gz
(13.0 kB
view details)
File details
Details for the file asyncwebsockets-0.7.1.tar.gz.
File metadata
- Download URL: asyncwebsockets-0.7.1.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86bab312fd0d8710790ac236787d07e5c68671e1a06b7d3a8a62f4c99f2364a6
|
|
| MD5 |
4d67b3c19d49905da8a1423d7c7da9c5
|
|
| BLAKE2b-256 |
68b5f90bbb596917b6066eb06fde42fdc66bf114aa110e2961826ce328386379
|