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/SunDwarf/asyncwebsockets.git#egg=asyncwebsockets


Basic Usage
-----------

.. code-block:: python

import multio
from asyncwebsockets import open_websocket, Websocket

async def main():
sock: Websocket = await connect_websocket("wss://echo.websocket.org")
await sock.send_message("Hello, world!")
ev = await sock.next_message()
print(ev.data) # "Hello, world!"
await sock.close(code=1000, reason="Goodbye")

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

.. _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.

Source Distribution

asyncwebsockets-0.1.dev2.tar.gz (5.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

asyncwebsockets-0.1.dev2-py3.6.egg (8.5 kB view details)

Uploaded Egg

asyncwebsockets-0.1.dev2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file asyncwebsockets-0.1.dev2.tar.gz.

File metadata

File hashes

Hashes for asyncwebsockets-0.1.dev2.tar.gz
Algorithm Hash digest
SHA256 06232215bdae2a0cd4eac7ca1c912db9571b0164067f8d415472d6534184a212
MD5 c847903c778406507f00c05f985cb325
BLAKE2b-256 8ea4f6ba283d2f54224b80fb7777dc88e01bc2fcb4d404a234ba4a8fff7ddcc0

See more details on using hashes here.

File details

Details for the file asyncwebsockets-0.1.dev2-py3.6.egg.

File metadata

File hashes

Hashes for asyncwebsockets-0.1.dev2-py3.6.egg
Algorithm Hash digest
SHA256 0ca7635f0023699bbf486530e7781ee1847cd099dddb33b57c903a1802be9849
MD5 b949f475f25f17959c9abf6c90ac5ac2
BLAKE2b-256 fb6a213c20fc7c19b6fb30839ad510d8785dc649ceb34ee109eadb3e0ec6390b

See more details on using hashes here.

File details

Details for the file asyncwebsockets-0.1.dev2-py3-none-any.whl.

File metadata

File hashes

Hashes for asyncwebsockets-0.1.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 a9cdf6856fcb37aa3d372545e04c94b3983bf653c661cd12ef6ec233972f8838
MD5 b1f55593ea9638c400c2ac9f8a90499c
BLAKE2b-256 2883a79d2eea11dded615960d4bb287a315e63c301db75756a4af7c67cf674b0

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