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.3.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

stickney-0.7.3-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

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

Hashes for stickney-0.7.3.tar.gz
Algorithm Hash digest
SHA256 0387add36a08b4585121852068b90eafbceb3b2f8a727c4e735205fabdddb25d
MD5 7dece31efbb8be58811e027e76d8de15
BLAKE2b-256 bbfefd0fed3eb80507e32ac96a3e589c1b18b0c9e0ec83b8378204b8c9de7dd2

See more details on using hashes here.

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

Hashes for stickney-0.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9bafc2ceb37d32b0d3fa7e20cccf240bbe41ca9fa8f03818d0440a1462286571
MD5 5a71140218677a49a6a36f891fe66132
BLAKE2b-256 804ecb8c6215b4e5572fa0aca6849827069bd3cd106d1b7383b547777650019c

See more details on using hashes here.

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