SignalR Core Python Client
A complete Python client for ASP.NET Core SignalR — supporting all transports, encodings, authentication, and reconnection strategies.

Features (V1.0.0 “poluca”)
| Feature | Details |
|---|---|
| Transports | WebSockets, Server-Sent Events, Long Polling |
| Encodings | JSON (text), MessagePack (binary) |
| Authentication | Access token factory, custom headers |
| Reconnection | Raw interval, exponential backoff strategies |
| SSL/TLS | Custom SSL context passthrough |
| Streaming | Server-to-client and client-to-server streaming |
| AsyncIO | Async/await support via AIOHubConnectionBuilder |
Quick Example
import logging
from signalrcore.hub_connection_builder import HubConnectionBuilder
hub_connection = HubConnectionBuilder()\
.with_url("wss://localhost:44376/chatHub")\
.configure_logging(logging.DEBUG)\
.with_automatic_reconnect({
"type": "raw",
"keep_alive_interval": 10,
"reconnect_interval": 5,
"max_attempts": 5
}).build()
hub_connection.on_open(lambda: print("Connected!"))
hub_connection.on_close(lambda: print("Disconnected"))
hub_connection.on("ReceiveMessage", print)
hub_connection.start()
hub_connection.send("SendMessage", ["username", "Hello!"])
hub_connection.stop()
Upcoming Changes
- Enhanced AsyncIO transport layer and callbacks
- Test suite split into integration and unit tests
- Ack/Sequence implementation
- Azure managed solution for testing