https://github.com/mpol1t/async-websocket-pool
async-websocket-pool is a Python library that enables efficient creation and management of a pool of asynchronous WebSocket clients.
https://github.com/mpol1t/async-websocket-pool
asyncio python websocket
Last synced: 5 months ago
JSON representation
async-websocket-pool is a Python library that enables efficient creation and management of a pool of asynchronous WebSocket clients.
- Host: GitHub
- URL: https://github.com/mpol1t/async-websocket-pool
- Owner: mpol1t
- License: mit
- Created: 2023-05-14T20:42:43.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2026-01-24T15:24:55.000Z (5 months ago)
- Last Synced: 2026-01-25T04:36:55.969Z (5 months ago)
- Topics: asyncio, python, websocket
- Language: Python
- Homepage:
- Size: 453 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://codecov.io/gh/mpol1t/async-websocket-pool)


[](https://github.com/mpol1t/async-websocket-pool/actions/workflows/github-code-scanning/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
```python
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](https://python-poetry.org/docs/) - 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