Skip to main content

Asynchronous websockets library

Project description

PyPI - Version

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

stickney-0.7.1.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

stickney-0.7.1-py3-none-any.whl (7.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page