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/
=======
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
Release history Release notifications | RSS feed
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.tar.gz
(5.5 kB
view details)
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file asyncwebsockets-0.1.tar.gz.
File metadata
- Download URL: asyncwebsockets-0.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b50072c052b8540529978f4a47d3d400aaf51603ca0136f5b69133ac1e38d13c
|
|
| MD5 |
e886e0cc7390b2a5801507bbf71f71f4
|
|
| BLAKE2b-256 |
88df5a819c4c6e7b9c95b2d9910d135a633d9dae9c18fecd0ab8d95521bc49bb
|
File details
Details for the file asyncwebsockets-0.1-py3.6.egg.
File metadata
- Download URL: asyncwebsockets-0.1-py3.6.egg
- Upload date:
- Size: 8.5 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87952b2930cd7cf263668045dff4ecc13ef865668451e987ef92af965034a79f
|
|
| MD5 |
2f8447c9e62d43af7c87dc79e53080e5
|
|
| BLAKE2b-256 |
dfdcc46c140bb2276b61535622370c446407b1fe0c2161d5ebb8b10ece8eab44
|
File details
Details for the file asyncwebsockets-0.1-py3-none-any.whl.
File metadata
- Download URL: asyncwebsockets-0.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efc1170d4a0b7a61f53288750c9a352cc66f12c9679a1130d5b06b6ae7b3620f
|
|
| MD5 |
dc40f0191b5d3ec22998535f2732197f
|
|
| BLAKE2b-256 |
8190b30a0c88fc2045c528c2d0d601e2abd0a17523539262947ac07807f54496
|