No project description provided
Project description
Async WebSocket client
A module that implements an asynchronous interface based on websockets for working with websockets
Functionality
- Регистрация / Удаление WS
- Создание / Удаление групп WS
- Подключение WS в группу
- Поддержка реестров: memory, redis
Quick start
Установка:
pip install async-websocket-client
Подключение:
import asyncio
from async_websocket_client.apps import AsyncWebSocketApp
from async_websocket_client.dispatchers import BaseDispatcher
class SomeDispatcher(BaseDispatcher):
async def on_connect(self):
return await self.ws.send('hello, server')
async def on_message(self, message: str):
return await self.ws.send(f'server, I received your message. len(message)=={len(message)}')
client = AsyncWebSocketApp('ws://localhost:8001/ws', SomeDispatcher())
client.asyncio_run() # quick run
# or
asyncio.run(client.run()) # Run with asyncio
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file async_websocket_client-0.1.0.tar.gz
.
File metadata
- Download URL: async_websocket_client-0.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.8.16 Linux/5.15.0-73-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7bfce4b42328e35604a692eff80e000e96a05facacfb4b7b051f0b654237eb9 |
|
MD5 | 7792147af04bd45d85f1e4a9f99845b8 |
|
BLAKE2b-256 | a2b71125e4a937b7a8aaf2b9ad09c58810660f4812afa88c323646d64bb4d776 |
File details
Details for the file async_websocket_client-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: async_websocket_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.8.16 Linux/5.15.0-73-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1219d707df5c403542f37ca4784ca375f8c8ad62b06d81ccdb250dfe96568bbf |
|
MD5 | de8633b134f903ac16410eb56d93a529 |
|
BLAKE2b-256 | 9f2cc52519f3a461f745169cdcb0914710a73fa0c519676da0a02d3d89554d87 |