Skip to main content

A websocket library for curio + trio

Project description

asyncwebsockets
=======

asyncwebsockets is a `curio`_ + `trio`_ compatible library for connecting and serving websockets.


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 multio
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))


multio.init("curio")
multio.run(test)

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


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
asyncwebsockets-0.3.0-py3.6.egg (9.0 kB) Copy SHA256 hash SHA256 Egg 3.6 Aug 13, 2018
asyncwebsockets-0.3.0-py3-none-any.whl (10.6 kB) Copy SHA256 hash SHA256 Wheel py3 Aug 13, 2018
asyncwebsockets-0.3.0.tar.gz (9.2 kB) Copy SHA256 hash SHA256 Source None Aug 13, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page