Skip to main content

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


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)

Uploaded Source

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

Hashes for asyncwebsockets-0.7.1.tar.gz
Algorithm Hash digest
SHA256 86bab312fd0d8710790ac236787d07e5c68671e1a06b7d3a8a62f4c99f2364a6
MD5 4d67b3c19d49905da8a1423d7c7da9c5
BLAKE2b-256 68b5f90bbb596917b6066eb06fde42fdc66bf114aa110e2961826ce328386379

See more details on using hashes here.

Supported by

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