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

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

Uploaded Source

Built Distribution

async_websocket_pool-0.1.9-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: async_websocket_pool-0.1.9.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.8.0-1014-azure

File hashes

Hashes for async_websocket_pool-0.1.9.tar.gz
Algorithm Hash digest
SHA256 c5a4c948ef45fb121fbf8ee466c8fb16999f89a742b86b7ec5183a5c19a14d62
MD5 6af2019fab2a2b55672ddc6253cfb56b
BLAKE2b-256 4be25ffd93a26d68b3f7b3e684e3659f635e374cd59718aea3ea6707beea9830

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_websocket_pool-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 dceebf4ebd630477dcaf110b806d7b41e940da6cd58913880674a091ff221d59
MD5 151e9ab9eb91f5b1a2e1b8ec524d4409
BLAKE2b-256 8c0145f48441064edceee1289d6ff3c4b75e1a8695b75d3f31942e31cbeb3073

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