Skip to main content

async-websocket-pool is a Python library that enables efficient creation and management of a pool of asynchronous WebSocket clients.

Project description

codecov GitHub PyPI - Python Version Python package CI CodeQL

Async WebSocket Pool

This repository contains a Python-based asynchronous WebSocket pool that allows for asynchronous connections to multiple WebSocket endpoints.

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Installation

You can install the async-websocket-pool using pip:

pip install async-websocket-pool

Please note that this project requires Python 3.7 or later.

Usage

from async_websocket_pool import connect, run_pool

async def on_message(message):
    print(message)

tasks = [
  lambda: connect('ws://example1.com', on_message=on_message, timeout=5),
  lambda: connect('ws://example2.com', on_message=on_message, timeout=5),
]

await run_pool(tasks)

Built With

  • Poetry - Packaging and dependency management

Documentation

For more information, please refer to the full documentation.

Contribution

Contributions are always welcome! Please read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes.

Authors

mpol1t

License

This project is licensed under the MIT License

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

async_websocket_pool-0.2.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

async_websocket_pool-0.2.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file async_websocket_pool-0.2.0.tar.gz.

File metadata

  • Download URL: async_websocket_pool-0.2.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.1 Linux/6.11.0-1018-azure

File hashes

Hashes for async_websocket_pool-0.2.0.tar.gz
Algorithm Hash digest
SHA256 39f9a5ad19eaca909688b0d4c5e83f1cf646fdef7c65a2d935cab3f8a243ba64
MD5 308d8611f18ed57f7e5959a5663dcf54
BLAKE2b-256 5cd0bc24a0747f11fca5cc8285caf51e3d7a170549fb70a580f5f21a69a7e20d

See more details on using hashes here.

File details

Details for the file async_websocket_pool-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: async_websocket_pool-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.1 Linux/6.11.0-1018-azure

File hashes

Hashes for async_websocket_pool-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e34fbfe713f3ccceb771fd2818687129e7a2b027851aef826f218d0141565af
MD5 e412b1a9b7e8d37ab75919cec1db5efe
BLAKE2b-256 eedee9ed9bd652094e79eb2d7924f56232e2968c5386e35b23b6dccaf4ffa86f

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