Asynchronous websockets library
Project description
Stickney is an asynchronous websockets library for AnyIO and Python 3.11+. This is primarily designed for Trio (as asyncio is a bastard evil terrible library that deadlocks constantly) usage.
Installation
Stickney is available on PyPI.
$ poetry add stickney@latest
Usage
Create a new websocket with the open_ws_connection function:
async with open_ws_connection(url="wss://example.websocket.server/path?a=b") as ws:
...
You can send messages with the send_message function and receive messages with the receive_single_message function. You can also use close, but the WS is closed automatically when the context manager exits.
There’s not really much else to it. See stickney/frames.py for the available message types.
Naming
Stickney is named after the Stickney crater on Phobos.
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
Built Distribution
File details
Details for the file stickney-0.7.3.tar.gz
.
File metadata
- Download URL: stickney-0.7.3.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.5 Linux/6.5.9-arch2-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0387add36a08b4585121852068b90eafbceb3b2f8a727c4e735205fabdddb25d |
|
MD5 | 7dece31efbb8be58811e027e76d8de15 |
|
BLAKE2b-256 | bbfefd0fed3eb80507e32ac96a3e589c1b18b0c9e0ec83b8378204b8c9de7dd2 |
File details
Details for the file stickney-0.7.3-py3-none-any.whl
.
File metadata
- Download URL: stickney-0.7.3-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.5 Linux/6.5.9-arch2-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bafc2ceb37d32b0d3fa7e20cccf240bbe41ca9fa8f03818d0440a1462286571 |
|
MD5 | 5a71140218677a49a6a36f891fe66132 |
|
BLAKE2b-256 | 804ecb8c6215b4e5572fa0aca6849827069bd3cd106d1b7383b547777650019c |