Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

asyncwebsockets

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asyncwebsockets

A websocket library

  • 0.9.4
  • PyPI
  • Socket score

Maintainers
2

asyncwebsockets

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

.. code-block:: python3

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)

.. _curio: https://curio.readthedocs.io/en/latest/ .. _trio: https://trio.readthedocs.io/en/latest/ .. _anyio: https://anyio.readthedocs.io/en/latest/

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc