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.9.4.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

asyncwebsockets-0.9.4-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file asyncwebsockets-0.9.4.tar.gz.

File metadata

  • Download URL: asyncwebsockets-0.9.4.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.8.2 requests/2.25.1 setuptools/63.2.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.10.5

File hashes

Hashes for asyncwebsockets-0.9.4.tar.gz
Algorithm Hash digest
SHA256 686d6bda94eecac2a45e11320ae8279fb2e5edafd37f6c0a1ac8cfa17db0f18a
MD5 291508471c17eb4c6cd8345d72521f54
BLAKE2b-256 4a96a340487e005b9cde3af1a72769cc5cc612b7ce7e67f2549b4d0688198bc1

See more details on using hashes here.

File details

Details for the file asyncwebsockets-0.9.4-py3-none-any.whl.

File metadata

  • Download URL: asyncwebsockets-0.9.4-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.8.2 requests/2.25.1 setuptools/63.2.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.10.5

File hashes

Hashes for asyncwebsockets-0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f1d82fbcbd016cd0811630f44b27bbe3b6e2369b157970517bebf945f6e6b2ea
MD5 74ecd0b8fb2313dc4220b58f409cf8c7
BLAKE2b-256 da9dab76dd06f03b09493a5046ef31fee5e20cf868b0a1b48a9f325628db32a1

See more details on using hashes here.

Supported by

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